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