30 lines
846 B
Makefile
30 lines
846 B
Makefile
|
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
|
||
|
|
||
|
lib/util.o: lib/util.h lib/util.c
|
||
|
gcc $(CFLAGS) -c -o lib/util.o lib/util.c
|
||
|
|
||
|
# Compiles the SGCA
|
||
|
boot: lib/network/tcp/server.o lib/network/udp/server.o lib/util.o central-manager.h central-manager.c
|
||
|
gcc $(CFLAGS) -o boot lib/network/udp/server.o lib/network/tcp/server.o lib/util.o central-manager.c
|
||
|
|
||
|
|
||
|
# Run full compilation
|
||
|
all: boot
|
||
|
|
||
|
# cleans the compiled files
|
||
|
clean:
|
||
|
rm boot;
|
||
|
rm ./**/*.o
|