summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 24 insertions, 5 deletions
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