29 lines
523 B
Makefile
Raw Normal View History

2011-06-16 08:16:10 +01:00
SOURCE=\
2011-06-27 10:45:30 +01:00
metadata.cc
2011-06-16 08:16:10 +01:00
2011-07-13 15:09:33 +01:00
PROGRAM_SOURCE=\
block_t.cc
2011-06-16 08:16:10 +01:00
OBJECTS=$(subst .cc,.o,$(SOURCE))
CPPFLAGS=-Wall -std=c++0x
2011-06-16 08:16:10 +01:00
INCLUDES=
LIBS=-lstdc++
2011-06-27 10:45:30 +01:00
.SUFFIXES: .cc .o .d
2011-06-16 08:16:10 +01:00
2011-06-27 10:45:30 +01:00
%.d: %.cc
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
2011-06-16 08:16:10 +01:00
.cc.o:
g++ -c $(CPPFLAGS) $(INCLUDES) -o $@ $<
2011-07-13 15:09:33 +01:00
multisnap_display: $(OBJECTS) main.o
g++ -o $@ $+ $(LIBS)
block_t: block_t.o
g++ -o $@ $+ $(LIBS)
2011-07-13 15:09:33 +01:00
include $(subst .cc,.d,$(SOURCE))
include $(subst .cc,.d,$(PROGRAM_SOURCE))