]>
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 | ||
f6bcfd97 | 29 | !if "$(WXUSINGDLL)" == "1" |
2cedc12a | 30 | LIBS=$(WXLIB) $(EXTRALIBS) cw32mti import32 ole2w32 regex_$(DEBUG_SUFFIX) zlib_$(DEBUG_SUFFIX) $(IMGLIBS) |
f6bcfd97 | 31 | !else |
2cedc12a | 32 | LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 regex_$(DEBUG_SUFFIX) zlib_$(DEBUG_SUFFIX) $(IMGLIBS) |
1eb9ddb9 MB |
33 | !endif |
34 | ||
35 | !if "$(wxUSE_ODBC)" == "1" | |
36 | LIBS=$(LIBS) odbc32 | |
f6bcfd97 | 37 | !endif |
4bf78aae | 38 | |
b2cf617c | 39 | # Note: you may need to remove some libraries for earlier versions of BC++, as below |
9d8c2f41 | 40 | #LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib tiff |
b2cf617c | 41 | |
8c3288a7 CE |
42 | !if "$(wxUSE_GUI)" == "0" |
43 | LINKOUT = /ap | |
44 | !else | |
45 | LINKOUT = /aa | |
46 | !endif | |
47 | ||
4bf78aae | 48 | !if "$(FINAL)" == "0" |
b2cf617c | 49 | #LINKFLAGS=/v /c /Tpe $(LNKCFG) $(EXTRALINKFLAGS) |
2cedc12a | 50 | LINKFLAGS=/v /c $(LINKOUT) -L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS) |
4bf78aae JS |
51 | OPT = -Od |
52 | DEBUG_FLAGS= -v | |
53 | !else | |
b2cf617c | 54 | #LINKFLAGS=/Tpe +$(LNKCFG) $(EXTRALINKFLAGS) |
2cedc12a | 55 | LINKFLAGS=$(LINKOUT) -L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS) |
4bf78aae JS |
56 | OPT = -Od |
57 | DEBUG_FLAGS = | |
58 | !endif | |
dbda9e86 | 59 | |
f6bcfd97 | 60 | CPPFLAGS=$(CPPFLAGS) $(DEBUG_FLAGS) $(OPT) |
dbda9e86 | 61 | |
8c3288a7 CE |
62 | !if "$(wxUSE_GUI)" == "0" |
63 | TARGETRES = | |
64 | STARTUP = c0x32.obj | |
65 | !else | |
2cedc12a | 66 | TARGETRES = $(EXEDIR)\$(TARGET).res |
8c3288a7 CE |
67 | STARTUP = c0w32.obj |
68 | !endif | |
69 | ||
2cedc12a CE |
70 | EXE_TARGET=$(EXEDIR)\$(TARGET) |
71 | ||
72 | default : all | |
73 | ||
74 | maked: | |
75 | -if not exist $(EXEDIR) mkdir $(EXEDIR) | |
4bf78aae | 76 | |
2cedc12a CE |
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) @&&! | |
8c3288a7 | 84 | $(STARTUP) $(OBJECTS) |
2cedc12a | 85 | $(EXE_TARGET) |
4bf78aae JS |
86 | nul |
87 | $(LIBS) | |
1eb9ddb9 | 88 | $(TARGETDEF) |
8c3288a7 | 89 | $(TARGETRES) |
4bf78aae JS |
90 | ! |
91 | ||
2cedc12a CE |
92 | .path.obj=$(EXEDIR) |
93 | ||
4bf78aae | 94 | .$(SRCSUFF).obj: |
2cedc12a | 95 | bcc32 $(CPPFLAGS) -c -o$(EXEDIR)\$(<B).obj {$< } |
4bf78aae JS |
96 | |
97 | .c.obj: | |
2cedc12a | 98 | bcc32 $(CPPFLAGS) -P- -c -o$(EXEDIR)\$(<B).obj {$< } |
4bf78aae | 99 | |
2cedc12a CE |
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) | |
4bf78aae JS |
102 | |
103 | clean: | |
2cedc12a CE |
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? | |
4bf78aae | 111 |