-
Notifications
You must be signed in to change notification settings - Fork 24
/
BCC.mak
68 lines (49 loc) · 1.3 KB
/
BCC.mak
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
# this makefile (NMake) creates the JWasm Win32 binary with Borland Commandline Tools.
name = jwasm
!ifndef DEBUG
DEBUG=0
!endif
!if $(DEBUG)
OUTD=build\BCC32D
!else
OUTD=build\BCC32R
!endif
inc_dirs = /Isrc\H
!if $(DEBUG)
extra_c_flags = -v -y -DDEBUG_OUT
!else
extra_c_flags = -O2 /DNDEBUG
!endif
c_flags =-q -WC -K -D__NT__ -w-8012 -w-8057 -w-8060 $(extra_c_flags)
CC = bcc32.exe -c $(inc_dirs) $(c_flags)
LINK = ilink32.exe -s -Tpe -ap -Gn -c -L$(BCDIR)\Lib
{src}.c{$(OUTD)}.obj:
@$(CC) -o$* $<
proj_obj = \
!include msmod.inc
TARGET1=$(OUTD)\$(name).exe
ALL: $(OUTD) $(TARGET1)
$(OUTD):
@mkdir $(OUTD)
$(OUTD)\$(name).exe : $(OUTD)/main.obj $(OUTD)/$(name).lib
@cd $(OUTD)
$(LINK) c0x32.obj +main.obj, $(name).exe, $(name).map, $(name).lib import32.lib cw32.lib
@cd ..
$(OUTD)\$(name).lib: $(proj_obj)
@cd $(OUTD)
@erase $(name).lib
!if $(DEBUG)
tlib $(name).lib /C $(proj_obj:BCC32D/=+)
!else
tlib $(name).lib /C $(proj_obj:BCC32R/=+)
!endif
@cd ..
$(OUTD)/msgtext.obj: src/msgtext.c src/H/msgdef.h
@$(CC) /o$* src/msgtext.c
$(OUTD)/reswords.obj: src/reswords.c src/H/instruct.h src/H/special.h src/H/directve.h
@$(CC) /o$* src/reswords.c
######
clean:
@erase $(OUTD)\*.exe
@erase $(OUTD)\*.obj
@erase $(OUTD)\*.map