]>
Commit | Line | Data |
---|---|---|
4414cc1d 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 tree library and 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 | # Change WXDIR to wherever wxWindows is found | |
21 | WXDIR = $(WXWIN) | |
22 | !include $(WXDIR)\src\makebcc.env | |
23 | ||
24 | WXLIB = $(WXDIR)\lib\wx.lib | |
25 | WXINC = $(WXDIR)\include | |
26 | CFG=$(WXWIN)\src\wxwin.cfg | |
27 | ||
28 | TREEDIR = $(WXDIR)\utils\wxtree | |
29 | TREELIB = $(TREEDIR)\lib\wxtree.lib | |
30 | ||
31 | WXHELPDIR = $(WXDIR)\utils\wxhelp | |
32 | TEX2RTFDIR = $(WXDIR)\utils\tex2rtf | |
33 | DOCDIR = $(WXHELPDIR)\docs | |
34 | ||
35 | # Default is to output RTF for WinHelp | |
36 | !ifndef WINHELP | |
37 | WINHELP=-winhelp | |
38 | !endif | |
39 | ||
40 | INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw | |
41 | ||
42 | LIBS=$(WXLIB) $(TREELIB) mathwl cwl import mathwl | |
43 | ||
44 | !ifndef FINAL | |
45 | FINAL=0 | |
46 | !endif | |
47 | ||
48 | !if "$(FINAL)" == "0" | |
49 | LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib | |
50 | OPT = -Od | |
51 | DEBUG_FLAGS= -v | |
52 | !else | |
53 | LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib | |
54 | OPT = -O2 | |
55 | DEBUG_FLAGS= | |
56 | !endif | |
57 | CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) | |
58 | CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) | |
59 | ||
60 | HEADERS = wxtree.h | |
61 | SOURCES = wxtree.$(SRCSUFF) | |
62 | OBJECTS = wxtree.obj | |
63 | ||
64 | all: $(TREELIB) | |
65 | ||
66 | .$(SRCSUFF).obj: | |
67 | bcc $(CPPFLAGS) $(INC) -c {$< } | |
68 | ||
69 | $(TREELIB): $(OBJECTS) | |
70 | erase $(TREELIB) | |
71 | tlib /P128 @&&! | |
72 | $(TREELIB) & | |
73 | +$(OBJECTS:.obj =.obj +) | |
74 | ! | |
75 | ||
76 | test.obj: test.$(SRCSUFF) | |
77 | ||
78 | test.res : test.rc $(WXDIR)\include\msw\wx.rc | |
79 | rc /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -r test | |
80 | ||
81 | test.exe: test.obj test.def test.res $(TREELIB) | |
82 | tlink $(LINKFLAGS) @&&! | |
83 | c0wl.obj test.obj | |
84 | test | |
85 | nul | |
86 | $(LIBS) | |
87 | test.def | |
88 | ! | |
89 | rc -K test.res | |
90 | ||
91 | clean: | |
92 | -erase *.obj | |
93 | -erase *.exe | |
94 | -erase *.res | |
95 | -erase ..\lib\*.lib | |
96 |