Makefile server
This commit is contained in:
parent
e4296187ee
commit
66365d8003
2 changed files with 24 additions and 34 deletions
35
.gitignore
vendored
35
.gitignore
vendored
|
@ -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
23
Makefile
Normal 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)
|
Loading…
Reference in a new issue