-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (30 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
COMPILERFLAGS = -Wall -std="c99" -g
CC = gcc
GTKFLAGS = `pkg-config --libs --cflags gtk+-3.0`
INCLUDE_DIR = ./include
#LIBPATH =
#LIBPATH = /opt/local/lib
CFLAGS = $(COMPILERFLAGS) -I$(INCLUDE_DIR)
#LIBRARIES = libchipmunk.a
LIBRARIES += -lchipmunk -lm
OBJS = networking.o protocols.o graphics.o physics.o common.o
BINS = server client gui
all: $(BINS)
gui: gui.c physics.c graphics.c common.c
$(CC) $(CFLAGS) -o gui gui.c physics.c graphics.c common.c $(LIBRARIES) $(GTKFLAGS)
server: physics common specs/common.h protocols graphics networking
$(CC) $(CFLAGS) -o server server.c $(OBJS) $(LIBRARIES) $(GTKFLAGS)
client: common graphics protocols client.c networking
$(CC) $(CFLAGS) -o client client.c $(OBJS) $(LIBRARIES) $(GTKFLAGS)
protocols: protocols.c specs/protocols.h common
$(CC) $(CFLAGS) -c -o protocols.o protocols.c $(GTKFLAGS)
graphics: graphics.c specs/graphics.h common
$(CC) $(CFLAGS) -c -o graphics.o graphics.c $(GTKFLAGS)
physics: physics.c specs/physics.h common
$(CC) $(CFLAGS) -c -o physics.o physics.c
common: common.c
$(CC) $(CFLAGS) -c -o common.o common.c
networking: networking.c specs/networking.h protocols
$(CC) $(CFLAGS) -c -o networking.o networking.c $(GTKFLAGS)
clean:
rm -f $(BINS) $(OBJS)