2017-04-03 16:04:57 +00:00
|
|
|
CFLAGS=-Wall
|
|
|
|
|
|
|
|
# Runs 'all' depenency as default / i.e. 'make' command will run 'make all' implicitly
|
|
|
|
default: all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/network/tcp/client.o: lib/header.h lib/network/tcp/client.h lib/network/tcp/client.c
|
|
|
|
gcc $(CFLAGS) -c -o lib/network/tcp/client.o lib/network/tcp/client.c
|
|
|
|
|
2017-04-18 08:36:32 +00:00
|
|
|
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-08 17:25:44 +00:00
|
|
|
|
2017-04-03 16:04:57 +00:00
|
|
|
# Compiles the Plane
|
2017-04-08 17:25:44 +00:00
|
|
|
# -lm flag for math lib
|
2017-04-18 08:36:32 +00:00
|
|
|
boot: lib/network/tcp/client.o lib/network/udp/server.o plane.h plane.c
|
|
|
|
gcc $(CFLAGS) -o boot lib/network/tcp/client.o lib/network/udp/server.o plane.c -lm
|
2017-04-03 16:04:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Run full compilation
|
2017-05-04 09:21:29 +00:00
|
|
|
all: clean boot
|
2017-04-03 16:04:57 +00:00
|
|
|
|
|
|
|
# cleans the compiled files
|
|
|
|
clean:
|
2017-05-16 19:02:52 +00:00
|
|
|
@find ./lib/network/**/*.o >/dev/null 2>&1 && rm ./lib/network/**/*.o || return 0;
|
|
|
|
@find ./boot >/dev/null 2>&1 && rm ./boot || return 0;
|