aboutsummaryrefslogtreecommitdiff
path: root/GEOLOC/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'GEOLOC/Makefile')
-rw-r--r--GEOLOC/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/GEOLOC/Makefile b/GEOLOC/Makefile
new file mode 100644
index 0000000..fdf543d
--- /dev/null
+++ b/GEOLOC/Makefile
@@ -0,0 +1,34 @@
+EXEC=GEOLOC
+export TARGET=MOBILE# ANCHOR or MOBILE
+export ANCHOR_ID=2# Define the anchor id
+export IS_MASTER=0# Define if this anchor is master or not
+export CC=gcc -g -D TARGET=$(TARGET) -D ANCHOR_ID=$(ANCHOR_ID) -D IS_MASTER=$(IS_MASTER) -Ilib -lm -pthread
+export LDFLAGS=-lwiringPi
+
+all:$(EXEC)
+
+$(EXEC): main.o lib/dragino.o lib/config.o lib/fskconfig.o app/app.o lib/gps.o
+ $(CC) $^ -o $(EXEC) $(LDFLAGS)
+
+main.o: main.c
+ $(CC) -c $< -o $@
+
+lib/dragino.o: lib/dragino.c
+ $(CC) -c $^ -o $@
+
+lib/config.o: lib/config.c
+ $(CC) -c $^ -o $@
+
+lib/fskconfig.o: lib/fskconfig.c
+ $(CC) -c $^ -o $@
+
+lib/gps.o: lib/gps.c
+ $(CC) -c $^ -o $@
+
+app/app.o:
+ $(MAKE) -C ./app
+
+clean:
+ -$(MAKE) -C ./app clean
+ -find ./ -name "*.o" -delete
+ -rm $(EXEC)