]>
Commit | Line | Data |
---|---|---|
457814b5 JS |
1 | # |
2 | # File: makefile.bcc | |
3 | # Author: Julian Smart | |
4 | # Created: 1993 | |
5 | # Updated: | |
6 | # Copyright: (c) 1993, AIAI, University of Edinburgh | |
7 | # | |
8 | # "%W% %G%" | |
9 | # | |
10 | # Makefile : Builds memcheck example (DOS). | |
11 | ||
12 | !if "$(BCCDIR)" == "" | |
13 | !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 | |
14 | !endif | |
15 | ||
16 | !if "$(WXWIN)" == "" | |
17 | !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx | |
18 | !endif | |
19 | ||
20 | WXDIR = $(WXWIN) | |
21 | !include $(WXDIR)\src\makebcc.env | |
22 | ||
23 | THISDIR = $(WXDIR)\samples\memcheck | |
24 | WXLIB = $(WXDIR)\lib\wx.lib | |
25 | LIBS=$(WXLIB) mathwl cwl import | |
26 | INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw | |
27 | CFG=$(WXDIR)\src\wxwin.cfg | |
28 | ||
29 | !ifndef FINAL | |
30 | FINAL=0 | |
31 | !endif | |
32 | ||
33 | !ifndef DEBUG | |
34 | DEBUG=0 | |
35 | !endif | |
36 | ||
37 | !if "$(FINAL)" == "0" | |
38 | LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib | |
39 | OPT = -Od | |
40 | DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) | |
41 | !else | |
42 | LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib | |
43 | OPT = -O2 | |
44 | DEBUG_FLAGS= -DDEBUG=$(DEBUG) | |
45 | !endif | |
46 | CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) | |
47 | ||
48 | OBJECTS = memcheck.obj | |
49 | ||
50 | memcheck: memcheck.exe | |
51 | ||
52 | all: memcheck.exe | |
53 | ||
54 | memcheck.exe: $(WXLIB) memcheck.obj memcheck.def memcheck.res | |
55 | tlink $(LINKFLAGS) @&&! | |
56 | c0wl.obj memcheck.obj | |
57 | memcheck | |
58 | nul | |
59 | $(LIBS) | |
60 | memcheck.def | |
61 | ! | |
62 | rc -31 -K memcheck.res | |
63 | ||
64 | .$(SRCSUFF).obj: | |
65 | bcc $(CPPFLAGS) -c {$< } | |
66 | ||
67 | memcheck.obj: memcheck.$(SRCSUFF) | |
68 | ||
69 | memcheck.res : memcheck.rc $(WXDIR)\include\wx\msw\wx.rc | |
70 | rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\wx memcheck | |
71 | ||
72 | clean: | |
73 | -erase *.obj | |
74 | -erase *.exe | |
75 | -erase *.res | |
76 | -erase *.map | |
77 | -erase *.rws |