-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.ow
81 lines (66 loc) · 1.72 KB
/
Makefile.ow
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
system = nt_win
CC = wcc386
RC = wrc
LINK = wlink
EXTNROM_SUPPORT=yes
HOSTFS_SUPPORT=yes
SOUND_SUPPORT=yes
SRCS = armcopro.c armemu.c arminit.c armarc.c &
armsupp.c main.c dagstandalone.c eventq.c &
arch/i2c.c arch/archio.c &
arch/fdc1772.c arch/hdc63463.c &
arch/keyboard.c arch/filecommon.c &
arch/ArcemConfig.c arch/cp15.c arch/newsound.c arch/displaydev.c &
libs/inih/ini.c
CFLAGS += -DSYSTEM_win -Iwin
SRCS += win/ControlPane.c win/DispKbd.c win/filecalls.c win/win.c
RCSRCS += win/gui.rc
resources = win/arc.ico win/gui.ico
CFLAGS += -bt=nt -I"$(%WATCOM)/h" -I"$(%WATCOM)/h/nt"
RCFLAGS += -bt=nt -I"$(%WATCOM)/h/nt" -Iwin
!ifeq SOUND_SUPPORT yes
CFLAGS += -DSOUND_SUPPORT
SRCS += win/sound.c
LIBS += winmm.lib
!endif
!ifeq HOSTFS_SUPPORT yes
CFLAGS += -DHOSTFS_SUPPORT
SRCS += hostfs.c
!endif
!ifeq EXTNROM_SUPPORT yes
CFLAGS += -DEXTNROM_SUPPORT
SRCS += arch/extnrom.c
!endif
CFLAGS += -zq -otanxh -d0 -wx -I. -Iarch
# newer OpenWatcom versions enable W303 by default
CFLAGS+= -wcd=303
OBJS = $(SRCS:.c=.obj)
RCOBJS = $(RCSRCS:.rc=.res)
name = ArcEm
LNK = $(name).lnk
$(name).exe : $(OBJS) $(RCOBJS) $(LNK)
$(LINK) @$(LNK)
$(RC) $(RCOBJS) $^@
$(LNK):
%create $(LNK)
@%append $(LNK) debug all
@%append $(LNK) name $(name)
@%append $(LNK) op map, quiet
@%append $(LNK) system $(system)
@%append $(LNK) option stack=64k
@for %i in ($(OBJS)) do @%append $(LNK) file %i
@for %i in ($(LIBS)) do @%append $(LNK) lib %i
.EXTENSIONS:
.EXTENSIONS: .exe
.EXTENSIONS: .obj .res
.EXTENSIONS: .c .h .rc .ico
.c:.;./arch;./win;./libs/inih
.ico:./win
.rc:./win
.c.obj :
$(CC) $(CFLAGS) -fo=$^@ $<
.rc.res : $(resources)
$(RC) -q -r $(RCFLAGS) -fo=$^@ $<
clean: .symbolic
rm -f $(name).exe $(name).map $(LNK) *.err
rm -f $(OBJS) $(RCOBJS)