]> git.saurik.com Git - wxWidgets.git/blob - src/makeprog.b32
0b06ef64954db865787767324baffbfec78a92f2
[wxWidgets.git] / src / makeprog.b32
1 #
2 # File: makeprog.b32
3 # Author: Julian Smart
4 # Created: 1999
5 # Updated:
6 # Copyright:
7 #
8 # Include file for samples and utilities. Set TARGET, OBJECTS and
9 # TARGETDEF (if you want to include a DEF file in the build) before
10 # including this file.
11
12 # WXWIN set by parent make
13 # BCCDIR set in makeb32.env
14
15 WXDIR = $(WXWIN)
16
17 !ifndef EXEDIR
18 EXEDIR = BORL
19 !endif
20
21 !include $(WXDIR)\src\makeb32.env
22
23 !if "$(wxUSE_GUI)" == "0"
24 IMGLIBS=
25 !else
26 IMGLIBS= png_$(DEBUG_SUFFIX) jpeg_$(DEBUG_SUFFIX) tiff_$(DEBUG_SUFFIX)
27 !endif
28
29 !if "$(WXUSINGDLL)" == "1"
30 LIBS=$(WXLIB) $(EXTRALIBS) cw32mti import32 ole2w32 regex_$(DEBUG_SUFFIX) zlib_$(DEBUG_SUFFIX) $(IMGLIBS)
31 !else
32 LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 regex_$(DEBUG_SUFFIX) zlib_$(DEBUG_SUFFIX) $(IMGLIBS)
33 !endif
34
35 !if "$(wxUSE_ODBC)" == "1"
36 LIBS=$(LIBS) odbc32
37 !endif
38
39 # Note: you may need to remove some libraries for earlier versions of BC++, as below
40 #LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib tiff
41
42 !if "$(wxUSE_GUI)" == "0"
43 LINKOUT = /ap
44 !else
45 LINKOUT = /aa
46 !endif
47
48 !if "$(FINAL)" == "0"
49 #LINKFLAGS=/v /c /Tpe $(LNKCFG) $(EXTRALINKFLAGS)
50 LINKFLAGS=/v /c $(LINKOUT) -L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS)
51 OPT = -Od
52 DEBUG_FLAGS= -v
53 !else
54 #LINKFLAGS=/Tpe +$(LNKCFG) $(EXTRALINKFLAGS)
55 LINKFLAGS=$(LINKOUT) -L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS)
56 OPT = -Od
57 DEBUG_FLAGS =
58 !endif
59
60 CPPFLAGS=$(CPPFLAGS) $(DEBUG_FLAGS) $(OPT)
61
62 !if "$(wxUSE_GUI)" == "0"
63 TARGETRES =
64 STARTUP = c0x32.obj
65 !else
66 TARGETRES = $(EXEDIR)\$(TARGET).res
67 STARTUP = c0w32.obj
68 !endif
69
70 EXE_TARGET=$(EXEDIR)\$(TARGET)
71
72 default : all
73
74 maked:
75 -if not exist $(EXEDIR) mkdir $(EXEDIR)
76
77 wx: $(EXE_TARGET).exe $(EXTRATARGETS)
78
79 all: maked wx
80
81
82 $(EXE_TARGET).exe: $(OBJECTS) $(TARGETDEF) $(TARGETRES)
83 $(LINK) $(LINKFLAGS) -j$(EXEDIR) @&&!
84 $(STARTUP) $(OBJECTS)
85 $(EXE_TARGET)
86 nul
87 $(LIBS)
88 $(TARGETDEF)
89 $(TARGETRES)
90 !
91
92 .path.obj=$(EXEDIR)
93
94 .$(SRCSUFF).obj:
95 bcc32 $(CPPFLAGS) -c -o$(EXEDIR)\$(<B).obj {$< }
96
97 .c.obj:
98 bcc32 $(CPPFLAGS) -P- -c -o$(EXEDIR)\$(<B).obj {$< }
99
100 $(TARGETRES) : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
101 brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include /i$(WXDIR)\contrib\include -fo$(EXEDIR)\$(<B).res $(TARGET)
102
103 clean:
104 -erase $(EXEDIR)\*.obj
105 -erase $(EXEDIR)\*.exe
106 -erase $(EXEDIR)\*.res
107 -erase $(EXEDIR)\*.map
108 -erase $(EXEDIR)\*.rws
109 -erase $(EXEDIR)\*.tds
110 -erase $(EXEDIR)\*.il?
111