summaryrefslogtreecommitdiff
path: root/2004/i/nono/src/GNUmakefile
diff options
context:
space:
mode:
authorschodet2004-02-07 16:55:41 +0000
committerschodet2004-02-07 16:55:41 +0000
commit9fdd6704947174fae292dfc6e14cc1029a7f7a6c (patch)
tree40a4fe775845ececdaf27e82d99d6a06f6b3803e /2004/i/nono/src/GNUmakefile
parentb673946d76e436c067d24e535b1e0a167b9dfc47 (diff)
Initial revision
Diffstat (limited to '2004/i/nono/src/GNUmakefile')
-rw-r--r--2004/i/nono/src/GNUmakefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/2004/i/nono/src/GNUmakefile b/2004/i/nono/src/GNUmakefile
new file mode 100644
index 0000000..624278b
--- /dev/null
+++ b/2004/i/nono/src/GNUmakefile
@@ -0,0 +1,44 @@
+SUBDIRS = camera config date erreur motor serial vision
+
+
+TARGETS =
+LIBS = -lm
+CXXFLAGS = -Wall -g
+CPPFLAGS = -I. -I$(SRCDIR) -I/usr/pkg/include $(DEFINES)
+#LDFLAGS = --static -L/usr/pkg/lib
+LDFLAGS = -L/usr/pkg/lib
+
+SRCDIR ?= .
+LIBPPM ?= -lppm
+LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH)
+
+VPATH = $(SUBDIRS:%=$(SRCDIR)/%)
+
+all: alltargets
+
+include $(SUBDIRS:%=$(SRCDIR)/%/Makefile.defs)
+
+alltargets: $(TARGETS)
+
+%.cc %.hh: %.yy
+ bison -o$(<F:%.yy=%.cc) --defines=$(<F:%.yy=%.h) $<
+
+%.cc: %.ll
+ flex -o$@ $<
+
+.dep/%.d: %.cc | .dep
+ @echo "Dependency checking for $<..."
+ @set -e; $(CXX) -M $(CPPFLAGS) $< \
+ | sed 's/\($*\)\.o[ :]*/\1.o .dep\/$*.d : /g' > $@; \
+ [ -s $@ ] || rm -f $@
+
+-include $(foreach target, $(TARGETS) $(subst .,_,$(LIBS)), $(patsubst %.cc, .dep/%.d, $(filter %.cc, $($(target)_SOURCES))))
+
+.dep:
+ mkdir .dep
+
+clean:
+ rm -f $(TARGETS) $(extra_clean) *.o *.a
+ rm -rf .dep
+
+.PHONY: all clean test alltargets