2017-04-01 15:01:36 +00:00
|
|
|
CFLAGS=-Wall -pthread
|
|
|
|
|
|
|
|
# Runs 'all' depenency as default / i.e. 'make' command will run 'make all' implicitly
|
|
|
|
default: all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/network/tcp/server.o: lib/header.h lib/network/tcp/server.h lib/network/tcp/server.c
|
|
|
|
gcc $(CFLAGS) -c -o lib/network/tcp/server.o lib/network/tcp/server.c
|
|
|
|
|
|
|
|
lib/network/udp/server.o: lib/header.h lib/network/udp/server.h lib/network/udp/server.c
|
|
|
|
gcc $(CFLAGS) -c -o lib/network/udp/server.o lib/network/udp/server.c
|
|
|
|
|
2017-04-18 18:06:14 +00:00
|
|
|
lib/network/udp/client.o: lib/header.h lib/network/udp/client.h lib/network/udp/client.c
|
|
|
|
gcc $(CFLAGS) -c -o lib/network/udp/client.o lib/network/udp/client.c
|
|
|
|
|
2017-04-09 17:33:27 +00:00
|
|
|
lib/local/middleware.o: lib/header.h lib/local/middleware.h lib/local/middleware.c
|
|
|
|
gcc $(CFLAGS) -c -o lib/local/middleware.o lib/local/middleware.c
|
|
|
|
|
|
|
|
lib/local/handler.o: lib/header.h lib/local/handler.h lib/local/handler.c
|
|
|
|
gcc $(CFLAGS) -c -o lib/local/handler.o lib/local/handler.c
|
|
|
|
|
2017-04-01 15:01:36 +00:00
|
|
|
|
|
|
|
# Compiles the SGCA
|
2017-04-18 18:06:14 +00:00
|
|
|
boot: lib/network/tcp/server.o lib/network/udp/server.o lib/network/udp/client.o lib/local/middleware.o lib/local/handler.o central-manager.h central-manager.c
|
|
|
|
gcc $(CFLAGS) -o boot lib/network/udp/server.o lib/network/udp/client.o lib/network/tcp/server.o lib/local/middleware.o lib/local/handler.o central-manager.c
|
2017-04-01 15:01:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Run full compilation
|
|
|
|
all: boot
|
|
|
|
|
|
|
|
# cleans the compiled files
|
|
|
|
clean:
|
|
|
|
rm boot;
|
2017-04-09 16:41:44 +00:00
|
|
|
rm lib/network/**/*.o;
|
2017-04-09 17:33:27 +00:00
|
|
|
rm lib/local/*.o;
|