| 1 |
##################################################################### |
| 2 |
## GNUmakefile for GNU Makefiles ('make') |
| 3 |
## |
| 4 |
## see makefile.msvc for Windows' 'nmake' |
| 5 |
##################################################################### |
| 6 |
|
| 7 |
CPPFLAGS=-I../fst |
| 8 |
|
| 9 |
sources=c_test.c cxx_test.cpp |
| 10 |
programs=$(patsubst %.c,%,$(filter %.c,$(sources))) $(patsubst %.cpp,%,$(filter %.cpp,$(sources))) |
| 11 |
|
| 12 |
.PHONY: all clean preproc |
| 13 |
|
| 14 |
all: $(programs) |
| 15 |
|
| 16 |
clean: |
| 17 |
-rm $(programs) |
| 18 |
-rm *.i *.ii |
| 19 |
|
| 20 |
preproc: $(patsubst %.c,%.i,$(filter %.c,$(sources))) $(patsubst %.cpp,%.ii,$(filter %.cpp,$(sources))) |
| 21 |
|
| 22 |
|
| 23 |
%.i: %.c |
| 24 |
$(CC) -E $(CPPFLAGS) $< > $@ |
| 25 |
%.ii: %.cpp |
| 26 |
$(CXX) -E $(CPPFLAGS) $< > $@ |