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:
2026-01-30 13:30:24 -06:00
parent d29e772272
commit 6856f6f2c8
9 changed files with 340 additions and 52 deletions

36
net/Makefile Executable file
View 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 $< $@