-
Notifications
You must be signed in to change notification settings - Fork 0
/
BCC.mak
71 lines (52 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
69
70
71
# this makefile (NMake) creates the JWasm Win32 binary with Borland Commandline Tools.
name = jwasm
!ifndef BCDIR
BCDIR = \bcc55
!endif
!ifndef DEBUG
DEBUG=0
!endif
!if $(DEBUG)
OUTD=BCC32D
!else
OUTD=BCC32R
!endif
inc_dirs = /IH /I"$(BCDIR)\include"
!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 = $(BCDIR)\bin\bcc32.exe -c $(inc_dirs) $(c_flags)
LINK = $(BCDIR)\Bin\ilink32.exe -s -Tpe -ap -Gn -c -L$(BCDIR)\Lib
.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) $(BCDIR)\Lib\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)
$(BCDIR)\bin\tlib $(name).lib /C $(proj_obj:BCC32D/=+)
!else
$(BCDIR)\bin\tlib $(name).lib /C $(proj_obj:BCC32R/=+)
!endif
@cd ..
$(OUTD)/msgtext.obj: msgtext.c H/msgdef.h
@$(CC) /o$* msgtext.c
$(OUTD)/reswords.obj: reswords.c H/instruct.h H/special.h H/directve.h
@$(CC) /o$* reswords.c
######
clean:
@erase $(OUTD)\*.exe
@erase $(OUTD)\*.obj
@erase $(OUTD)\*.map