28 lines
881 B
Makefile
28 lines
881 B
Makefile
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
|
|
|
|
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
|
|
|
|
# Compiles the Plane
|
|
# -lm flag for math lib
|
|
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
|
|
|
|
|
|
# Run full compilation
|
|
all: boot
|
|
|
|
# cleans the compiled files
|
|
clean:
|
|
@find ./lib/network/**/*.o >/dev/null 2>&1 && rm ./lib/network/**/*.o || return 0;
|
|
@find ./boot >/dev/null 2>&1 && rm ./boot || return 0;
|