From 8a08b9dce9cfc161494ddb07a1c979c7796780ff Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Fri, 15 Jun 2012 22:56:00 +0200 Subject: restructure code it is now loading its components from plugins --- Makefile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4253f89..ffdc860 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,27 @@ -test-shell: actuators/*.vala actuators/*/*.vala sensors/*.vala sensors/*/*.vala hw/*.vala \ - ctrl/*.vala ctrl/*/*.vala test-shell.vala enums.vala - valac -o $@ --pkg posix --pkg linux --pkg readline -X -lreadline -X -lm $^ +VALAC=valac +CC=gcc + +ACCELEROMETERS := $(wildcard sensors/accelerometers/*.vala) +OBJECTS := $(patsubst %.vala, %.o, $(SOURCES)) + +all: microcopterd plugins + +microcopterd: actuators/*.vala sensors/*.vala hw/*.vala \ + ctrl/*.vala receiver/*.vala *.vala + $(VALAC) -g -o $@ --pkg posix --pkg linux --pkg gmodule-2.0 --pkg readline -X -lreadline -X -lm $^ + +plugins: + @cd actuators/motor ; make + @cd ctrl/models ; make + @cd receiver ; make + @cd sensors/accelerometer ; make + @cd sensors/barometer ; make + @cd sensors/compass ; make + @cd sensors/gyroscope ; make clean: - rm -f test-shell *.c */*.c */*/*.c + rm -f microcopterd + rm -f *.so */*.so */*/*.so + rm -f *.c */*.c */*/*.c -.PHONY: clean +.PHONY: clean plugins -- cgit v1.2.3