]> rtime.felk.cvut.cz Git - coffee/mt-apps.git/blobdiff - Makefile
websockets server added
[coffee/mt-apps.git] / Makefile
index f7ce7b8d97f8f323068e335d00974e46f65bdbf3..964d4b2f5c0d10e8fff0a6c423bdbd0fe4018a47 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,16 @@
-OUTPUT_FILE=mt-rfid
+SOURCE_FILES = mt_rfid.c
+OUTPUT_FILE = mt-rfid
+LIBRARIES = -lev -luFCoder-armhf
 
-all: main.c
-       $(CC) $(CFLAGS) -o $(OUTPUT_FILE) $(IDIR) main.c -luFCoder-armhf
+all: mt-rfid mt-server
+
+mt-rfid: $(SOURCE_FILES)
+       $(CC) $(CFLAGS) -o $(OUTPUT_FILE) $(SOURCE_FILES) $(LIBRARIES)
+
+mt-server: mt_server.c
+       $(CC) $(CFLAGS) -o mt-server mt_server.c $(LIBRARIES) -lwebsockets
 
 .PHONY: clean
 
 clean:
-       rm $(OUTPUT_FILE)
+       rm -f $(OUTPUT_FILE)