EMD/Makefile

36 lines
746 B
Makefile
Raw Normal View History

2011-11-30 19:02:40 +08:00
.SUFFIXES:
.SUFFIXES:.cpp .o
2011-11-30 19:24:28 +08:00
EXEC=emd
2011-12-06 00:17:32 +08:00
SOURCES=main.cpp Euclidean.cpp
2011-11-30 19:02:40 +08:00
OBJETS=$(SOURCES:%.cpp=%.o)
2011-11-30 19:24:28 +08:00
CC=g++
2011-11-30 19:02:40 +08:00
CFLAGS=-Wall -ansi -pedantic -ffast-math -I /usr/X11R6/include -I ./CImg
LFLAGS= -L . -L /usr/X11R6/lib -lpthread -lX11 -lXext -Dcimg_use_xshm -lm
$(EXEC):$(OBJETS) Makefile
2011-11-30 19:24:28 +08:00
$(CC) -o $(EXEC) $(OBJETS) $(LFLAGS)
2011-11-30 19:02:40 +08:00
.cpp.o:
2011-11-30 19:24:28 +08:00
$(CC) $(CFLAGS) -c $< -o $@
2011-11-30 19:02:40 +08:00
2011-12-09 18:46:59 +08:00
debug: CFLAGS += -DDEBUG
debug: LFLAGS += -DDEBUG
debug: $(EXEC)
2011-11-30 19:02:40 +08:00
clean:
2011-12-06 00:17:32 +08:00
rm -f $(OBJETS)
2011-11-30 19:02:40 +08:00
clear:
2011-12-06 00:17:32 +08:00
rm -f $(EXEC)
2011-11-30 19:02:40 +08:00
depend:
sed -e "/^#DEPENDANCIES/,$$ d" Makefile >dependances
echo "#DEPENDANCIES" >> dependances
2011-11-30 19:24:28 +08:00
$(CC) -MM $(SOURCES) >> dependances
2011-11-30 19:02:40 +08:00
cat dependances >Makefile
rm dependances
2011-12-09 21:05:33 +08:00
#DEPENDANCIES
main.o: main.cpp CImg.h Euclidean.hpp
Euclidean.o: Euclidean.cpp Euclidean.hpp