Makefile server

This commit is contained in:
Claudio Maggioni 2018-01-02 12:48:41 +01:00
parent e4296187ee
commit 66365d8003
2 changed files with 24 additions and 34 deletions

35
.gitignore vendored
View file

@ -1,34 +1 @@
# ---> C
# Object files
*.o
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
/out/*

23
Makefile Normal file
View file

@ -0,0 +1,23 @@
HEADERS = gamedata.h
ODIR = out
_OBJ = gamedata.o server.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
TDIR = out
_TARGET = server
TARGET = $(TDIR)/$(_TARGET)
CC = gcc
CFLAGS = -g -Wall
default: server
$(ODIR)/%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o out/$@
server: $(OBJ)
$(CC) $(OBJ) -o $(TARGET)
clean:
-rm -f $(OBJ) $(TARGET)