projects
/
dosdemo
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
envmap, fake phong texture generation, and more
[dosdemo]
/
libs
/
oldmik
/
Makefile.dj
1
csrc = $(wildcard src/*.c)
2
obj = $(csrc:.c=.cof)
3
4
alib = mikmod.dja
5
6
opt = -O3 -ffast-math
7
#dbg = -g
8
9
ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
10
hostsys = dos
11
else
12
hostsys = unix
13
TOOLPREFIX = i586-pc-msdosdjgpp-
14
endif
15
16
CC = $(TOOLPREFIX)gcc
17
AR = $(TOOLPREFIX)ar
18
CFLAGS = -march=pentium $(opt) $(dbg) -Isrc
19
20
$(alib): $(obj)
21
$(AR) rcs $@ $(obj)
22
23
%.cof: %.c
24
$(CC) $(CFLAGS) -o $@ -c $<
25
26
.PHONY: clean
27
ifeq ($(hostsys), dos)
28
clean:
29
del src\*.cof
30
del $(alib)
31
else
32
clean:
33
rm -f $(obj) $(alib)
34
endif