https://doi.org/10.5201/ipol.2011.blm-cdf
Revision 2ac5a1527b132f8930c5a8ec10cd641388a89e9e authored by Software Heritage on 01 January 2011, 00:00:00 UTC, committed by Software Heritage on 22 June 2011, 00:00:00 UTC
0 parent
Tip revision: 2ac5a1527b132f8930c5a8ec10cd641388a89e9e authored by Software Heritage on 01 January 2011, 00:00:00 UTC
ipol: Deposit 654 in collection ipol
ipol: Deposit 654 in collection ipol
Tip revision: 2ac5a15
makefileDebug
# Copyright 2010 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
# Jose-Luis Lisani <joseluis.lisani@uib.es>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
# C source code
CSRC = io_png/io_png.c
# C++ source code
CXXSRC = rgbprocess.cpp rgbprocess_lib.cpp cppcode/mdmath.cpp cppcode/miscIPOL.cpp \
cppcode/colorfilteringIPOL.cpp cppcode/rgbcubeIPOL.cpp
# all source code
SRC = $(CSRC) $(CXXSRC)
# C objects
COBJ = $(CSRC:.c=.o)
# C++ objects
CXXOBJ = $(CXXSRC:.cpp=.o)
# all objects
OBJ = $(COBJ) $(CXXOBJ)
# binary target
BIN = rgbprocess
default : $(BIN)
# C compilation flags
CFLAGS = -g
# C++ compilation flags
CXXFLAGS = -g
# link flags
LDFLAGS = -lpng -lm
# use local embedded libraries with `make LOCAL_LIBS=1`
ifdef LOCAL_LIBS
# library location
LIBDIR = io_png/libs/build/lib
INCDIR = io_png/libs/build/include
# libpng is required
LIBDEPS += libpng
# compile options to use the local libpng header
CFLAGS += -I$(INCDIR) -D_LOCAL_LIBS
# link options to use the local libraries
LDFLAGS = $(LIBDIR)/libpng.a $(LIBDIR)/libz.a -lm
# io_png.o needs png.h
io_png/io_png.o : $(LIBDEPS)
endif
# build the local png library
.PHONY : libpng
libpng :
$(MAKE) -C io_png/libs libpng
# partial compilation of C source code
%.o: %.c %.h
$(CC) -c -o $@ $< $(CFLAGS)
# partial compilation of C++ source code
%.o: %.cpp %.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
# link all the opject code
$(BIN): $(OBJ) $(LIBDEPS)
$(CXX) -o $@ $(OBJ) $(LDFLAGS)
# housekeeping
.PHONY : clean distclean
clean :
$(RM) $(OBJ)
$(MAKE) -C ./io_png/libs $@
distclean : clean
$(RM) $(BIN)
$(MAKE) -C ./io_png/libs $@

Computing file changes ...