first attempt at setting write-combining with MTRRs. It works, but no
[retrobench] / Makefile.dj
1 src = $(wildcard src/*.c) $(wildcard src/dos/*.c)
2 ssrc = sinlut.s
3 obj = $(src:.c=.o) $(ssrc:.s=.o)
4 dep = $(src:.c=.d)
5 coff = rbench
6 bin = $(coff).exe
7 bin0 = $(coff)0.exe
8
9 LUTGEN = tools/lutgen.exe
10
11 warn = -pedantic -Wall -Wno-deprecated-declarations
12 dbg = -g
13 opt = -O3 -ffast-math
14 inc = -Isrc
15 def = -DNO_STDINT_H
16
17 CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(def) $(inc) -fno-strict-aliasing -MMD
18 LDFLAGS = -Wl,-Map=link.map
19
20 $(bin0): $(bin)
21         exe2coff $<
22         copy /b \djgpp\bin\cwsdstr0.exe+$(coff) $@
23
24 $(bin): $(obj)
25         $(CC) -o $@ $(obj) $(LDFLAGS)
26
27 sinlut.s: $(LUTGEN)
28         $(LUTGEN) >$@
29
30 -include $(dep)
31 -include *.d
32
33 .PHONY: clean
34 clean:
35         del src\*.o
36         del src\dos\*.o
37         del *.o
38         del $(bin)
39         del sinlut.s
40
41 .PHONY: cleandep
42 cleandep:
43         del src\*.d
44         del src\dos\*.d
45         del *.d
46
47 $(LUTGEN): tools/lutgen.c
48         $(CC) -o $@ $< -lm