-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (40 loc) · 1.67 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
48
49
50
51
52
53
54
55
56
57
# -DDEBUG turns on debugging output
# -DWIN32 for building on Windows
# if you're not using git comment out these lines
USE_GIT = -DUSE_GIT
GIT_COMMIT = git_commit.h
-include Makefile.OSX
CC = gcc
CPP = g++
CFLAGS = -g -Wall -Wextra -Wconversion $(DEBUG) $(USE_GIT) $(OSX_COMPAT_CFLAGS)
LDFLAGS = $(OSX_COMPAT_LDFLAGS)
#DEBUG = -g3 -O0 -fstack-protector-all -fstack-protector-strong -Wstack-protector -Wpedantic -Wformat=2 -Wcast-qual #-DDEBUG
all: grs
tarball:
rm -f grs.tar grs.tar.gz
tar cf grs.tar README CHANGES TODO Makefile *.h *.cc getopt grscat
gzip grs.tar
grs: Makefile main.o frame.o update.o queue.o team.o player.o pitcher.o list.o
$(CPP) $(CFLAGS) $(LDFLAGS) -o grs main.o frame.o update.o queue.o team.o player.o pitcher.o list.o
main.o: Makefile main.cc frame.h team.h player.h pitcher.h config.h $(GIT_COMMIT)
$(CPP) $(CFLAGS) -c main.cc
frame.o: Makefile frame.cc update.cc frame.h queue.h team.h player.h pitcher.h extern.h config.h
$(CPP) $(CFLAGS) -c frame.cc
update.o: Makefile frame.cc update.cc frame.h queue.h team.h player.h pitcher.h extern.h config.h
$(CPP) $(CFLAGS) -c update.cc
team.o: Makefile team.cc team.h player.h pitcher.h extern.h config.h
$(CPP) $(CFLAGS) -c team.cc
queue.o: Makefile queue.cc queue.h pitcher.h
$(CPP) $(CFLAGS) -c queue.cc
player.o: Makefile player.cc player.h config.h
$(CPP) $(CFLAGS) -c player.cc
pitcher.o: Makefile pitcher.cc pitcher.h config.h
$(CPP) $(CFLAGS) -c pitcher.cc
list.o: Makefile list.cc list.h
$(CPP) $(CFLAGS) -c list.cc
getopt.o: Makefile getopt/getopt.c getopt/getopt.h
$(CC) $(CFLAGS) -c getopt/getopt.c
git_commit.h:
bash git_commit.sh > git_commit.h
clean:
rm -f *.o grs grs.tar.gz git_commit.h