1999-01-04 21:51:15 +00:00
|
|
|
#
|
|
|
|
# File: makeprog.b32
|
|
|
|
# Author: Julian Smart
|
|
|
|
# Created: 1999
|
|
|
|
# Updated:
|
|
|
|
# Copyright:
|
|
|
|
#
|
2003-04-09 13:19:40 +00:00
|
|
|
# Include file for samples and utilities. Set TARGET, OBJECTS and
|
|
|
|
# TARGETDEF (if you want to include a DEF file in the build) before
|
|
|
|
# including this file.
|
1999-01-04 21:51:15 +00:00
|
|
|
|
2002-05-02 13:56:41 +00:00
|
|
|
# WXWIN set by parent make
|
|
|
|
# BCCDIR set in makeb32.env
|
1999-01-04 21:51:15 +00:00
|
|
|
|
|
|
|
WXDIR = $(WXWIN)
|
2003-05-26 11:34:39 +00:00
|
|
|
|
|
|
|
!ifndef EXEDIR
|
|
|
|
EXEDIR = BORL
|
|
|
|
!endif
|
|
|
|
|
1999-01-04 21:51:15 +00:00
|
|
|
!include $(WXDIR)\src\makeb32.env
|
|
|
|
|
2002-12-04 14:11:26 +00:00
|
|
|
!if "$(wxUSE_GUI)" == "0"
|
|
|
|
IMGLIBS=
|
|
|
|
!else
|
2003-06-17 13:22:34 +00:00
|
|
|
IMGLIBS= png_bc$(DEBUG_SUFFIX) jpeg_bc$(DEBUG_SUFFIX) tiff_bc$(DEBUG_SUFFIX)
|
2002-12-04 14:11:26 +00:00
|
|
|
!endif
|
|
|
|
|
2003-05-27 13:43:30 +00:00
|
|
|
!if "$(FINAL)" == "0"
|
2003-06-17 13:22:34 +00:00
|
|
|
EX_LIBS=$(EXTRALIBS:.lib=_bcd.lib)
|
2003-05-27 13:43:30 +00:00
|
|
|
!else
|
2003-06-17 13:22:34 +00:00
|
|
|
EX_LIBS=$(EXTRALIBS:.lib=_bc.lib)
|
2003-05-27 13:43:30 +00:00
|
|
|
!endif
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
!if "$(WXUSINGDLL)" == "1"
|
2003-06-17 13:22:34 +00:00
|
|
|
LIBS=$(WXLIB) $(EX_LIBS) cw32mti import32 ole2w32 regex_bc$(DEBUG_SUFFIX) zlib_bc$(DEBUG_SUFFIX) $(IMGLIBS)
|
2000-07-15 19:51:35 +00:00
|
|
|
!else
|
2003-06-17 13:22:34 +00:00
|
|
|
LIBS=$(WXLIB) $(EX_LIBS) cw32mt import32 ole2w32 regex_bc$(DEBUG_SUFFIX) zlib_bc$(DEBUG_SUFFIX) $(IMGLIBS)
|
2003-04-09 13:19:40 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
!if "$(wxUSE_ODBC)" == "1"
|
|
|
|
LIBS=$(LIBS) odbc32
|
2000-07-15 19:51:35 +00:00
|
|
|
!endif
|
1999-01-04 21:51:15 +00:00
|
|
|
|
2000-03-17 17:59:56 +00:00
|
|
|
|
2002-09-04 10:56:49 +00:00
|
|
|
!if "$(wxUSE_GUI)" == "0"
|
|
|
|
LINKOUT = /ap
|
|
|
|
!else
|
|
|
|
LINKOUT = /aa
|
|
|
|
!endif
|
|
|
|
|
1999-01-04 21:51:15 +00:00
|
|
|
!if "$(FINAL)" == "0"
|
2000-03-17 17:59:56 +00:00
|
|
|
#LINKFLAGS=/v /c /Tpe $(LNKCFG) $(EXTRALINKFLAGS)
|
2003-07-10 07:50:57 +00:00
|
|
|
LINKFLAGS=/v /c $(LINKOUT) -L"$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk" $(EXTRALINKFLAGS)
|
1999-01-04 21:51:15 +00:00
|
|
|
OPT = -Od
|
|
|
|
DEBUG_FLAGS= -v
|
|
|
|
!else
|
2000-03-17 17:59:56 +00:00
|
|
|
#LINKFLAGS=/Tpe +$(LNKCFG) $(EXTRALINKFLAGS)
|
2003-07-10 07:50:57 +00:00
|
|
|
LINKFLAGS=$(LINKOUT) -L"$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk" $(EXTRALINKFLAGS)
|
1999-01-04 21:51:15 +00:00
|
|
|
OPT = -Od
|
|
|
|
DEBUG_FLAGS =
|
|
|
|
!endif
|
1999-02-09 16:00:23 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
CPPFLAGS=$(CPPFLAGS) $(DEBUG_FLAGS) $(OPT)
|
1999-02-09 16:00:23 +00:00
|
|
|
|
2002-09-04 10:56:49 +00:00
|
|
|
!if "$(wxUSE_GUI)" == "0"
|
|
|
|
TARGETRES =
|
|
|
|
STARTUP = c0x32.obj
|
|
|
|
!else
|
2003-05-26 11:34:39 +00:00
|
|
|
TARGETRES = $(EXEDIR)\$(TARGET).res
|
2002-09-04 10:56:49 +00:00
|
|
|
STARTUP = c0w32.obj
|
|
|
|
!endif
|
|
|
|
|
2003-05-26 11:34:39 +00:00
|
|
|
EXE_TARGET=$(EXEDIR)\$(TARGET)
|
|
|
|
|
|
|
|
default : all
|
|
|
|
|
|
|
|
maked:
|
2003-06-12 15:23:25 +00:00
|
|
|
-if not exist $(EXEDIR)\nul mkdir $(EXEDIR)
|
1999-01-04 21:51:15 +00:00
|
|
|
|
2003-05-26 11:34:39 +00:00
|
|
|
wx: $(EXE_TARGET).exe $(EXTRATARGETS)
|
|
|
|
|
|
|
|
all: maked wx
|
|
|
|
|
|
|
|
|
|
|
|
$(EXE_TARGET).exe: $(OBJECTS) $(TARGETDEF) $(TARGETRES)
|
|
|
|
$(LINK) $(LINKFLAGS) -j$(EXEDIR) @&&!
|
2002-09-04 10:56:49 +00:00
|
|
|
$(STARTUP) $(OBJECTS)
|
2003-05-26 11:34:39 +00:00
|
|
|
$(EXE_TARGET)
|
1999-01-04 21:51:15 +00:00
|
|
|
nul
|
|
|
|
$(LIBS)
|
2003-04-09 13:19:40 +00:00
|
|
|
$(TARGETDEF)
|
2002-09-04 10:56:49 +00:00
|
|
|
$(TARGETRES)
|
1999-01-04 21:51:15 +00:00
|
|
|
!
|
|
|
|
|
2003-05-26 11:34:39 +00:00
|
|
|
.path.obj=$(EXEDIR)
|
|
|
|
|
1999-01-04 21:51:15 +00:00
|
|
|
.$(SRCSUFF).obj:
|
2003-06-12 15:23:25 +00:00
|
|
|
bcc32 $(CPPFLAGS) -c -n$(EXEDIR) {$< }
|
1999-01-04 21:51:15 +00:00
|
|
|
|
|
|
|
.c.obj:
|
2003-06-12 15:23:25 +00:00
|
|
|
bcc32 $(CPPFLAGS) -P- -c -n$(EXEDIR) {$< }
|
1999-01-04 21:51:15 +00:00
|
|
|
|
2003-06-19 09:21:07 +00:00
|
|
|
!if "$(wxUSE_GUI)" != "0"
|
|
|
|
#make resources only with GUI apps
|
2003-05-26 11:34:39 +00:00
|
|
|
$(TARGETRES) : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
|
|
|
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include /i$(WXDIR)\contrib\include -fo$(EXEDIR)\$(<B).res $(TARGET)
|
2003-06-19 09:21:07 +00:00
|
|
|
!endif
|
1999-01-04 21:51:15 +00:00
|
|
|
|
|
|
|
clean:
|
2003-06-12 15:23:25 +00:00
|
|
|
-$(RM) $(EXEDIR)\*.obj
|
|
|
|
-$(RM) $(EXEDIR)\*.exe
|
|
|
|
-$(RM) $(EXEDIR)\*.res
|
|
|
|
-$(RM) $(EXEDIR)\*.map
|
|
|
|
-$(RM) $(EXEDIR)\*.rws
|
|
|
|
-$(RM) $(EXEDIR)\*.tds
|
|
|
|
-$(RM) $(EXEDIR)\*.il?
|
1999-01-04 21:51:15 +00:00
|
|
|
|