-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 1.2 KB
/
Makefile
File metadata and controls
35 lines (27 loc) · 1.2 KB
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
all: test demo
CC=gcc
LIBS=
CFLAGS=-Os -pipe -ansi
DEBUGCFLAGS=-Og -pipe -g -Wall -ansi -pedantic
INPUT=test.c
OUTPUT=test
RM=/bin/rm
test: test.c vt100utils.h
$(CC) $(INPUT) -o $(OUTPUT) $(LIBS) $(CFLAGS)
demo: demos/overflow.c demos/hover.c demos/words.c vt100utils.h
$(CC) demos/overflow.c -o demos/overflow $(LIBS) $(CFLAGS)
$(CC) demos/hover.c -o demos/hover $(LIBS) $(CFLAGS)
$(CC) demos/words.c -o demos/words $(LIBS) $(CFLAGS)
$(CC) demos/truecolor_stresstest.c -o demos/truecolor_stresstest $(LIBS) -lm $(CFLAGS)
debug: test.c demos/overflow.c demos/hover.c demos/words.c vt100utils.h
$(CC) $(INPUT) -o $(OUTPUT) $(LIBS) $(DEBUGCFLAGS)
$(CC) demos/overflow.c -o demos/overflow $(LIBS) $(DEBUGCFLAGS)
$(CC) demos/hover.c -o demos/hover $(LIBS) $(DEBUGCFLAGS)
$(CC) demos/words.c -o demos/words $(LIBS) $(DEBUGCFLAGS)
$(CC) demos/truecolor_stresstest.c -o demos/truecolor_stresstest $(LIBS) -lm $(DEBUGCFLAGS)
clean:
if [ -e $(OUTPUT) ]; then $(RM) $(OUTPUT); fi
if [ -e demos/overflow ]; then $(RM) demos/overflow; fi
if [ -e demos/hover ]; then $(RM) demos/hover; fi
if [ -e demos/words ]; then $(RM) demos/words; fi
if [ -e demos/truecolor_stresstest ]; then $(RM) demos/truecolor_stresstest; fi