reorganized the source code
[dosdemo] / libs / anim / Makefile.dj
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.cof)
3 alib = anim.dja
4
5 ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
6         hostsys = dos
7 else
8         hostsys = unix
9         TOOLPREFIX = i586-pc-msdosdjgpp-
10 endif
11
12 CC = $(TOOLPREFIX)gcc
13 AR = $(TOOLPREFIX)ar
14 CFLAGS = -Wno-main -march=pentium -g -O3 -ffast-math -I.. -I../../src
15
16 $(alib): $(obj)
17         $(AR) rcs $@ $(obj)
18
19 %.cof: %.c
20         $(CC) $(CFLAGS) -o $@ -c $<
21
22 .PHONY: clean
23 ifeq ($(hostsys), dos)
24 clean:
25         del src\*.cof
26         del $(alib)
27 else
28 clean:
29         rm -f $(obj) $(alib)
30 endif