-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 880 Bytes
/
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
# $Id: Makefile,v 1.7 2003/07/13 10:23:18 martinus Exp $
CC = clang
CFLAGS = ${OPT} ${DBG} ${TRACINGDBG}
OPT = -O3 -fomit-frame-pointer -Werror -Wall -Wno-unused-variable -Wno-unused-label
LEGACY_BUILD = -DSINGLE_THREADED_API
# DBG = -g -fsanitize=address
# TRACINGDBG = -DDEBUG=2
LD =
EXECUTABLES = exhaust 0xhaust
all: ${EXECUTABLES}
0xhaust: sim.o asm.o pspace.o 0xhaust.c
${CC} ${CFLAGS} -o 0xhaust sim.o asm.o pspace.o 0xhaust.c ${LD}
exhaust: legacy_sim.o asm.o pspace.o exhaust.c
${CC} ${CFLAGS} ${LEGACY_BUILD} -o exhaust legacy_sim.o asm.o pspace.o exhaust.c ${LD}
asm.o: asm.c
${CC} ${CFLAGS} -c asm.c
pspace.o: pspace.c
${CC} ${CFLAGS} -c pspace.c
sim.o: sim.c
${CC} ${CFLAGS} -c sim.c
legacy_sim.o: sim.c
${CC} ${CFLAGS} ${LEGACY_BUILD} -c sim.c -o legacy_sim.o
format:
clang-format -i -style=Google *.h *.c
clean:
rm -f *~ *.o core ${EXECUTABLES}