From c26565727fadf8b516111ec34aa4fceaf0121b71 Mon Sep 17 00:00:00 2001 From: schodet Date: Thu, 8 May 2003 21:23:21 +0000 Subject: Mise en place du système de makefiles. --- 2003/i/buzz/i386/GNUmakefile | 4 ++++ 2003/i/buzz/mips/GNUmakefile | 4 ++++ 2003/i/buzz/src/GNUmakefile | 40 ++++++++++++++++++++++++++++++---- 2003/i/buzz/src/automate/GNUmakefile | 30 ------------------------- 2003/i/buzz/src/automate/Makefile.defs | 5 +++++ 2003/i/buzz/src/automate/lexer.ll | 2 +- 2003/i/buzz/src/busp/GNUmakefile | 15 ------------- 2003/i/buzz/src/busp/Makefile.defs | 4 ++++ 2003/i/buzz/src/camera/GNUmakefile | 16 -------------- 2003/i/buzz/src/camera/Makefile.defs | 7 ++++++ 2003/i/buzz/src/erreur/GNUmakefile | 13 ----------- 2003/i/buzz/src/erreur/Makefile.defs | 3 +++ 2003/i/buzz/src/vision/GNUmakefile | 29 ------------------------ 2003/i/buzz/src/vision/Makefile.defs | 7 ++++++ 14 files changed, 71 insertions(+), 108 deletions(-) create mode 100644 2003/i/buzz/i386/GNUmakefile create mode 100644 2003/i/buzz/mips/GNUmakefile delete mode 100644 2003/i/buzz/src/automate/GNUmakefile create mode 100644 2003/i/buzz/src/automate/Makefile.defs delete mode 100644 2003/i/buzz/src/busp/GNUmakefile create mode 100644 2003/i/buzz/src/busp/Makefile.defs delete mode 100644 2003/i/buzz/src/camera/GNUmakefile create mode 100644 2003/i/buzz/src/camera/Makefile.defs delete mode 100644 2003/i/buzz/src/erreur/GNUmakefile create mode 100644 2003/i/buzz/src/erreur/Makefile.defs delete mode 100644 2003/i/buzz/src/vision/GNUmakefile create mode 100644 2003/i/buzz/src/vision/Makefile.defs (limited to '2003/i') diff --git a/2003/i/buzz/i386/GNUmakefile b/2003/i/buzz/i386/GNUmakefile new file mode 100644 index 0000000..00dfbeb --- /dev/null +++ b/2003/i/buzz/i386/GNUmakefile @@ -0,0 +1,4 @@ +SRCDIR = ../src +LIBPPM = -lppm + +include $(SRCDIR)/GNUmakefile diff --git a/2003/i/buzz/mips/GNUmakefile b/2003/i/buzz/mips/GNUmakefile new file mode 100644 index 0000000..785831d --- /dev/null +++ b/2003/i/buzz/mips/GNUmakefile @@ -0,0 +1,4 @@ +SRCDIR = ../src +LIBPPM = -lnetpbm + +include $(SRCDIR)/GNUmakefile diff --git a/2003/i/buzz/src/GNUmakefile b/2003/i/buzz/src/GNUmakefile index 49d861d..81442eb 100644 --- a/2003/i/buzz/src/GNUmakefile +++ b/2003/i/buzz/src/GNUmakefile @@ -1,7 +1,39 @@ -SUBDIRS = busp camera erreur kernel vision +SUBDIRS = automate busp camera erreur vision +TARGETS = +CXXFLAGS = -Wall -g +CPPFLAGS = -I. -I$(SRCDIR) -I/usr/pkg/include +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$( $@; \ + [ -s $@ ] || rm -f $@ + +-include $(foreach target, $(TARGETS), $($(filter %.cc, $(target)_SOURCES):%.cc=.dep/%.d)) + +.dep: + mkdir .dep + clean: - for i in $(SUBDIRS); \ - do $(MAKE) -C $$i clean; \ - done + rm -f $(TARGETS) $(extra_clean) *.o *.a + rm -rf .dep diff --git a/2003/i/buzz/src/automate/GNUmakefile b/2003/i/buzz/src/automate/GNUmakefile deleted file mode 100644 index 0f0e9b7..0000000 --- a/2003/i/buzz/src/automate/GNUmakefile +++ /dev/null @@ -1,30 +0,0 @@ -SRCDIR = .. -CXXFLAGS = -Wall -g -CPPFLAGS = -I$(SRCDIR) - -TARGETS = grafcet.a -grafcet_a_SOURCES = grafcet.cc receptivite.cc action.cc grammar.tab.cc lexer.cc - -all: $(TARGETS) - -grammar.tab.cc grammar.tab.hh: grammar.yy - bison $< - -lexer.cc: lexer.ll grammar.tab.hh - flex -o$@ $< - -grafcet.a: ${grafcet_a_SOURCES:%.cc=grafcet.a(%.o)} - -.dep/%.d: %.cc .dep - @set -e; $(CC) -M $(CPPFLAGS) $< \ - | sed 's/\($*\)\.o[ :]*/\1.o .dep\/$*.d : /g' > $@; \ - [ -s $@ ] || rm -f $@ - --include $(grafcet_a_SOURCES:%.cc=.dep/%.d) - -.dep: - @mkdir .dep - -clean: - rm -f $(TARGETS) *.o - rm -rf .dep diff --git a/2003/i/buzz/src/automate/Makefile.defs b/2003/i/buzz/src/automate/Makefile.defs new file mode 100644 index 0000000..ca0a7a9 --- /dev/null +++ b/2003/i/buzz/src/automate/Makefile.defs @@ -0,0 +1,5 @@ +automate_a_SOURCES = grafcet.cc receptivite.cc action.cc grammar.cc lexer.cc + +extra_clean += grammar.h grammar.cc lexer.cc + +automate.a: ${automate_a_SOURCES:%.cc=automate.a(%.o)} diff --git a/2003/i/buzz/src/automate/lexer.ll b/2003/i/buzz/src/automate/lexer.ll index 6760aee..9cf6c93 100644 --- a/2003/i/buzz/src/automate/lexer.ll +++ b/2003/i/buzz/src/automate/lexer.ll @@ -5,7 +5,7 @@ using namespace std; #include "grafcet.h" using namespace Automate; -#include "grammar.tab.hh" +#include "grammar.h" int yyparse (void); diff --git a/2003/i/buzz/src/busp/GNUmakefile b/2003/i/buzz/src/busp/GNUmakefile deleted file mode 100644 index e575f30..0000000 --- a/2003/i/buzz/src/busp/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ -SRCDIR = .. -CXXFLAGS = -Wall -g -CPPFLAGS = -I$(SRCDIR) - -TARGETS = test_busp -test_busp_SOURCES = busp.cc busp_ir.cc busp_servo.cc test_busp.cc \ - $(SRCDIR)/erreur/erreur.a - -all: $(TARGETS) - -test_busp: $(test_busp_SOURCES:%.cc=%.o) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDADD) - -clean: - rm -f $(TARGETS) *.o diff --git a/2003/i/buzz/src/busp/Makefile.defs b/2003/i/buzz/src/busp/Makefile.defs new file mode 100644 index 0000000..4e2d12c --- /dev/null +++ b/2003/i/buzz/src/busp/Makefile.defs @@ -0,0 +1,4 @@ +TARGETS += test_busp +test_busp_SOURCES = busp.cc busp_ir.cc busp_servo.cc test_busp.cc erreur.a + +test_busp: $(test_busp_SOURCES:%.cc=%.o) diff --git a/2003/i/buzz/src/camera/GNUmakefile b/2003/i/buzz/src/camera/GNUmakefile deleted file mode 100644 index 56aaef9..0000000 --- a/2003/i/buzz/src/camera/GNUmakefile +++ /dev/null @@ -1,16 +0,0 @@ -SRCDIR = .. -CXXFLAGS = -Wall -g -CPPFLAGS = -I$(SRCDIR) -I/usr/pkg/include -LDFLAGS = -L/usr/pkg/lib -LDADD = -lnetpbm - -TARGETS = test_camera -test_camera_SOURCES = camera.cc test_camera.cc $(SRCDIR)/vision/vision.a $(SRCDIR)/erreur/erreur.a - -all: $(TARGETS) - -test_camera: $(test_camera_SOURCES:%.cc=%.o) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDADD) - -clean: - rm -f $(TARGETS) *.o diff --git a/2003/i/buzz/src/camera/Makefile.defs b/2003/i/buzz/src/camera/Makefile.defs new file mode 100644 index 0000000..060aaaa --- /dev/null +++ b/2003/i/buzz/src/camera/Makefile.defs @@ -0,0 +1,7 @@ +TARGETS += test_camera +test_camera_SOURCES = camera.cc test_camera.cc vision.a erreur.a -lppm +camera_a_SOURCES = camera.cc + +test_camera: $(test_camera_SOURCES:%.cc=%.o) + +camera.a: ${camera_a_SOURCES:%.cc=camera.a(%.o)} diff --git a/2003/i/buzz/src/erreur/GNUmakefile b/2003/i/buzz/src/erreur/GNUmakefile deleted file mode 100644 index e888f79..0000000 --- a/2003/i/buzz/src/erreur/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ -SRCDIR = .. -CXXFLAGS = -Wall -g -CPPFLAGS = -I$(SRCDIR) - -TARGETS = erreur.a -erreur_a_SOURCES = erreur.cc - -all: $(TARGETS) - -erreur.a: $(erreur_a_SOURCES:%.cc=erreur.a(%.o)) - -clean: - rm -f $(TARGETS) *.o diff --git a/2003/i/buzz/src/erreur/Makefile.defs b/2003/i/buzz/src/erreur/Makefile.defs new file mode 100644 index 0000000..a76a201 --- /dev/null +++ b/2003/i/buzz/src/erreur/Makefile.defs @@ -0,0 +1,3 @@ +erreur_a_SOURCES = erreur.cc + +erreur.a: $(erreur_a_SOURCES:%.cc=erreur.a(%.o)) diff --git a/2003/i/buzz/src/vision/GNUmakefile b/2003/i/buzz/src/vision/GNUmakefile deleted file mode 100644 index 6527e4e..0000000 --- a/2003/i/buzz/src/vision/GNUmakefile +++ /dev/null @@ -1,29 +0,0 @@ -SRCDIR = .. -CXXFLAGS = -Wall -g -CPPFLAGS = -I$(SRCDIR) -I/usr/pkg/include -LDFLAGS = -L/usr/pkg/lib -LDADD = -lnetpbm - -TARGETS = test_image vision.a -test_image_SOURCES = test_image.cc image.cc thresholds.cc -vision_a_SOURCES = image.cc thresholds.cc - -all: $(TARGETS) - -test_image: $(test_image_SOURCES:%.cc=%.o) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDADD) - -vision.a: ${vision_a_SOURCES:%.cc=vision.a(%.o)} - -.dep/%.d: %.cc .dep - @set -e; $(CC) -M $(CPPFLAGS) $< \ - | sed 's/\($*\)\.o[ :]*/\1.o .dep\/$*.d : /g' > $@; \ - [ -s $@ ] || rm -f $@ - -include $(test_image_SOURCES:%.cc=.dep/%.d) - -.dep: - @mkdir .dep - -clean: - rm -f $(TARGETS) *.o diff --git a/2003/i/buzz/src/vision/Makefile.defs b/2003/i/buzz/src/vision/Makefile.defs new file mode 100644 index 0000000..d90037e --- /dev/null +++ b/2003/i/buzz/src/vision/Makefile.defs @@ -0,0 +1,7 @@ +TARGETS += test_image +test_image_SOURCES = test_image.cc image.cc thresholds.cc camera.a erreur.a -lppm +vision_a_SOURCES = image.cc thresholds.cc + +test_image: $(test_image_SOURCES:%.cc=%.o) + +vision.a: ${vision_a_SOURCES:%.cc=vision.a(%.o)} -- cgit v1.2.3