]> git.xonotic.org Git - xonotic/gmqcc.git/blob - include.mk
ed7822afa748bf79a94e1f461e63f711e3910c4b
[xonotic/gmqcc.git] / include.mk
1 # default directories and paths
2 DESTDIR :=
3 OPTIONAL:=
4 PREFIX  := /usr/local
5 BINDIR  := $(PREFIX)/bin
6 DATADIR := $(PREFIX)/share
7 MANDIR  := $(DATADIR)/man
8
9 # compiler
10 CC      ?= clang
11
12 # linker flags and optional additional libraries if required
13 LDFLAGS +=
14 LIBS    += -lm
15
16 #objects
17 OBJ_C = main.o ansi.o util.o stat.o fs.o lexer.o parser.o code.o ast.o ir.o conout.o ftepp.o opts.o utf8.o correct.o fold.o intrin.o
18 OBJ_P = pak.o ansi.o util.o stat.o fs.o conout.o opts.o pak.o
19 OBJ_T = test.o ansi.o util.o stat.o fs.o opts.o conout.o
20 OBJ_X = exec-standalone.o ansi.o util.o stat.o fs.o opts.o conout.o
21
22 #gource flags
23 GOURCEFLAGS =                 \
24     --date-format "%d %B, %Y" \
25     --seconds-per-day 0.01    \
26     --auto-skip-seconds 1     \
27     --title "GMQCC"           \
28     --key                     \
29     --camera-mode overview    \
30     --highlight-all-users     \
31     --file-idle-time 0        \
32     --hide progress,mouse     \
33     --stop-at-end             \
34     --max-files 99999999999   \
35     --max-file-lag 0.000001   \
36     --bloom-multiplier 1.3    \
37     --logo doc/html/gmqcc.png \
38     -1280x720
39
40 #ffmpeg flags for gource
41 FFMPEGFLAGS=                  \
42     -y                        \
43     -r 60                     \
44     -f image2pipe             \
45     -vcodec ppm               \
46     -i -                      \
47     -vcodec libx264           \
48     -preset ultrafast         \
49     -crf 1                    \
50     -threads 0                \
51     -bf 0
52
53 #splint flags
54 SPLINTFLAGS =                 \
55     -redef                    \
56     -noeffect                 \
57     -nullderef                \
58     -usedef                   \
59     -type                     \
60     -mustfreeonly             \
61     -nullstate                \
62     -varuse                   \
63     -mustfreefresh            \
64     -compdestroy              \
65     -compmempass              \
66     -nullpass                 \
67     -onlytrans                \
68     -predboolint              \
69     -boolops                  \
70     -incondefs                \
71     -macroredef               \
72     -retvalint                \
73     -nullret                  \
74     -predboolothers           \
75     -globstate                \
76     -dependenttrans           \
77     -branchstate              \
78     -compdef                  \
79     -temptrans                \
80     -usereleased              \
81     -warnposix                \
82     +charindex                \
83     -kepttrans                \
84     -unqualifiedtrans         \
85     +matchanyintegral         \
86     +voidabstract             \
87     -nullassign               \
88     -unrecog                  \
89     -casebreak                \
90     -retvalbool               \
91     -retvalother              \
92     -mayaliasunique           \
93     -realcompare              \
94     -observertrans            \
95     -abstract                 \
96     -statictrans              \
97     -castfcnptr
98
99 #always the right rule
100 default: all
101
102 #uninstall rule
103 uninstall:
104         rm -f $(DESTDIR)$(BINDIR)/gmqcc
105         rm -f $(DESTDIR)$(BINDIR)/qcvm
106         rm -f $(DESTDIR)$(BINDIR)/gmqpak
107         rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqcc.1
108         rm -f $(DESTDIR)$(MANDIR)/man1/doc/qcvm.1
109         rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqpak.1
110
111 STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \)
112
113 whitespace:
114         find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';'
115 newline:
116         find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';'
117 indent:
118         find . -type f $(STYLE_MATCH) -exec sed -i 's/\t/    /g' '{}' ';'
119
120 style: whitespace newline indent