git had the makefile ignored and not im stranded. updated gitignoreand have a good starting point for the game server. working on moving it into the game
This commit is contained in:
36
net/Makefile
Executable file
36
net/Makefile
Executable file
@@ -0,0 +1,36 @@
|
||||
#Troy Rosin tjr760 11200680
|
||||
|
||||
CC =gcc
|
||||
CFLAGS =-g
|
||||
CPPFLAGS =-c -g -Wall -pedantic
|
||||
LDFLAGS =-lSDL2 -lSDL2_net
|
||||
|
||||
BIN =build/bin/
|
||||
LIB =build/lib/
|
||||
OBJ =build/obj/
|
||||
DIRS =$(BIN) $(LIB) $(OBJ)
|
||||
|
||||
debug ?=on
|
||||
ifeq ($(debug),on)
|
||||
CPPFLAGS += -Ddebug
|
||||
endif
|
||||
|
||||
BINARIES = client server
|
||||
|
||||
all : $(BINARIES)
|
||||
|
||||
clean :
|
||||
rm -rf build/ lib/ bin/ $(BINARIES)
|
||||
|
||||
$(DIRS) :
|
||||
mkdir -p $@
|
||||
|
||||
$(BIN)% : $(OBJ)%.o | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
$(OBJ)%.o : %.c net.h | $(OBJ)
|
||||
$(CC) $(CPPFLAGS) -o $@ $< -I.
|
||||
|
||||
|
||||
$(BINARIES) : % : $(BIN)%
|
||||
ln -sf $< $@
|
||||
Reference in New Issue
Block a user