-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile.bc
215 lines (168 loc) · 4.28 KB
/
makefile.bc
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# $Id: makefile.bc,v 1.15 2010/06/10 05:12:11 alkresin Exp $
# makefile for Borland C/C++ 32 bits
# Building of Leto binaries
.AUTODEPEND
# uncomment this line if you want to build letodb with xharbour
# XHARBOUR = yes
SRV_MODE = __WIN_DAEMON__
# SRV_MODE = __CONSOLE__
!if !$d(ECHO)
ECHO = echo.
!endif
!if !$d(DEL)
DEL = del
!endif
HRB_DIR = $(HB_PATH)
INCLUDE_DIR = include;$(HRB_DIR)\include
HARBOUR_EXE = $(HRB_DIR)\bin\harbour.exe
!if $(SRV_MODE) == __CONSOLE__
HB_GT_LIB = gtwin.lib
!else
HB_GT_LIB = gtgui.lib
!endif
!if $d(XHARBOUR)
HARBOUR_LIBS = debug.lib vm.lib rtl.lib $(HB_GT_LIB) lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib dbffpt.lib hbsix.lib common.lib codepage.lib pcrepos.lib
!else
HARBOUR_LIBS = hbdebug.lib hbvm.lib hbrtl.lib $(HB_GT_LIB) hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbsix.lib hbcommon.lib hbcpage.lib hbpcre.lib
# HARBOUR_LIBS = debug.lib vm.lib rtl.lib $(HB_GT_LIB) lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib dbffpt.lib hbsix.lib common.lib codepage.lib
!endif
WINDOWS_LIBS = cw32mt.lib import32.lib
CC = bcc32
LINKER = TLIB
BIN_DIR = $(HRB_DIR)\bin
LETO_BIN_DIR = bin
LETO_LIB_DIR = lib
# This is needed, otherwise the libs may overflow when
# debug info is requested with -v -y
# if debug info is requested, set ARFLAGS to /P64 in your environment
!if !$d(ARFLAGS)
ARFLAGS = /0
!endif
#!if !$d(BCC_NOOPTIM)
# CFLAGS = -O2 $(CFLAGS)
#!endif
#
# Directory macros. These should never have to change.
#
SERVER_DIR = source\server
CLIENT_DIR = source\client
COMMON_DIR = source\common
#
# C compiler definition and C flags. These should never have to change.
#
CFLAGS = -I$(INCLUDE_DIR) -d $(C_USR) $(CFLAGS) -tWM -D__WIN32__ -D$(SRV_MODE)
CLIBFLAGS = -c $(CFLAGS) $(CLIBFLAGS)
CEXEFLAGS = -L$(HRB_DIR)\lib -lGn -lTpe -laa $(CFLAGS)
CLIBFLAGSDEBUG = -v $(CLIBFLAGS)
HARBOURFLAGS = -i$(INCLUDE_DIR) -n -q0 -w -es2 -gc0 -d$(SRV_MODE) $(PRG_USR) $(HARBOURFLAGS)
LDFLAGS = $(LDFLAGS)
CC_CMD = $(CC) $(CLIBFLAGS) -o$@ $**
HB_CMD = $(HARBOUR_EXE) $(HARBOURFLAGS) $** -o$@
#
# Macros to access our library names
#
CLIENT_RDD_LIB = $(LETO_LIB_DIR)\rddleto.lib
CLIENT_LIB = $(LETO_LIB_DIR)\leto.lib
SERVER_EXE = $(LETO_BIN_DIR)\letodb.exe
#
# Rules
#
#
# RDDLETO.LIB rules
#
CLIENT_RDD_LIB_OBJS = \
$(OBJ_DIR)\letocl.obj \
$(OBJ_DIR)\leto1.obj \
$(OBJ_DIR)\letomgmn.obj \
$(OBJ_DIR)\hbip.obj \
$(OBJ_DIR)\common_c.obj \
$(OBJ_DIR)\blowfish.obj \
$(OBJ_DIR)\rddsys.obj
#
# LETO.LIB rules
#
CLIENT_LIB_OBJS = \
$(OBJ_DIR)\letocl.obj \
$(OBJ_DIR)\hbip.obj \
$(OBJ_DIR)\common_c.obj \
$(OBJ_DIR)\blowfish.obj \
#
# LETO.EXE rules
#
SERVER_EXE_OBJS = \
$(OBJ_DIR)\server.obj \
$(OBJ_DIR)\common.obj \
$(OBJ_DIR)\hbip.obj \
$(OBJ_DIR)\common_c.obj \
$(OBJ_DIR)\blowfish.obj \
$(OBJ_DIR)\letofunc.obj \
$(OBJ_DIR)\letocore.obj \
$(OBJ_DIR)\letoacc.obj \
$(OBJ_DIR)\letovars.obj \
$(OBJ_DIR)\leto_win.obj \
$(OBJ_DIR)\errint.obj \
$(OBJ_DIR)\errorsys.obj
#
# Our default target
#
PROJECT = \
$(CLIENT_RDD_LIB) \
$(CLIENT_LIB) \
$(SERVER_EXE)
ALL: $(PROJECT)
#
# Library dependencies and build rules
#
$(CLIENT_RDD_LIB) : $(CLIENT_RDD_LIB_OBJS)
IF EXIST "$(CLIENT_RDD_LIB)" $(DEL) "$(CLIENT_RDD_LIB)" > NUL
$(LINKER) "$(CLIENT_RDD_LIB)" $(ARFLAGS) @&&!
+$(**: = &^
+)
!
$(CLIENT_LIB) : $(CLIENT_LIB_OBJS)
IF EXIST "$(CLIENT_LIB)" $(DEL) "$(CLIENT_LIB)" > NUL
$(LINKER) "$(CLIENT_LIB)" $(ARFLAGS) @&&!
+$(**: = &^
+)
!
$(SERVER_EXE) : $(SERVER_EXE_OBJS)
IF EXIST "$(SERVER_EXE)" $(DEL) "$(SERVER_EXE)" > NUL
$(CC) @&&!
$(CEXEFLAGS)
-e$(SERVER_EXE)
$(**: = ^
)
$(HARBOUR_LIBS)
$(WINDOWS_LIBS)
!
#
# CLIENT_RDD.LIB Dependencies
#
{$(CLIENT_DIR)}.prg{$(OBJ_DIR)}.c:
$(HB_CMD)
.c.obj:
$(CC_CMD)
{$(CLIENT_DIR)}.c{$(OBJ_DIR)}.obj:
$(CC_CMD)
{$(COMMON_DIR)}.c{$(OBJ_DIR)}.obj:
$(CC_CMD)
#
# CLIENT.LIB Dependencies
#
.c.obj:
$(CC_CMD)
{$(CLIENT_DIR)}.c{$(OBJ_DIR)}.obj:
$(CC_CMD)
{$(COMMON_DIR)}.c{$(OBJ_DIR)}.obj:
$(CC_CMD)
#
# SERVER.EXE dependencies
#
{$(SERVER_DIR)}.prg{$(OBJ_DIR)}.c:
$(HB_CMD)
{$(COMMON_DIR)}.prg{$(OBJ_DIR)}.c:
$(HB_CMD)
{$(SERVER_DIR)}.c{$(OBJ_DIR)}.obj:
$(CC_CMD)
{$(COMMON_DIR)}.c{$(OBJ_DIR)}.obj:
$(CC_CMD)