123456789101112131415161718192021222324252627 |
- CXXFLAGS = -O2 -g
- CFLAGS = -O2 -g
- LIBS = -lboost_filesystem
- OBJS = $(patsubst %.c, %.o, $(wildcard *.c)) \
- $(patsubst %.cc, %.o, $(wildcard *.cc))
- C_DEPS = $(patsubst %.c, %.dep, $(wildcard *.c))
- CXX_DEPS = $(patsubst %.cc, %.depxx, $(wildcard *.cc))
- tx01_data : $(OBJS)
- $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
- sinclude $(DEPS)
- %.dep : %.c
- $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@:.g' < $@.$$$$ > $@; \
- $(RM) $@.$$$$
- %.depxx : %.cc
- $(CXX) -MM $(CXXFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@:.g' < $@.$$$$ > $@; \
- $(RM) $@.$$$$
- .PHONY : clean
- clean:
- $(RM) tx01_data $(OBJS) $(C_DEPS) $(CXX_DEPS)
|