# # File: makefile.bcc # Author: Julian Smart # Created: 1993 # Updated: # Copyright: (c) 1993, AIAI, University of Edinburgh # # "%W% %G%" # # Makefile : Builds tree library and example (DOS). !if "$(BCCDIR)" == "" !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 !endif !if "$(WXWIN)" == "" !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx !endif # Change WXDIR to wherever wxWindows is found WXDIR = $(WXWIN) !include $(WXDIR)\src\makebcc.env WXLIB = $(WXDIR)\lib\wx.lib WXINC = $(WXDIR)\include CFG=$(WXWIN)\src\wxwin.cfg TREEDIR = $(WXDIR)\utils\wxtree TREELIB = $(TREEDIR)\lib\wxtree.lib WXHELPDIR = $(WXDIR)\utils\wxhelp TEX2RTFDIR = $(WXDIR)\utils\tex2rtf DOCDIR = $(WXHELPDIR)\docs # Default is to output RTF for WinHelp !ifndef WINHELP WINHELP=-winhelp !endif INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw LIBS=$(WXLIB) $(TREELIB) mathwl cwl import mathwl !ifndef FINAL FINAL=0 !endif !if "$(FINAL)" == "0" LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib OPT = -Od DEBUG_FLAGS= -v !else LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib OPT = -O2 DEBUG_FLAGS= !endif CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) HEADERS = wxtree.h SOURCES = wxtree.$(SRCSUFF) OBJECTS = wxtree.obj all: $(TREELIB) .$(SRCSUFF).obj: bcc $(CPPFLAGS) $(INC) -c {$< } $(TREELIB): $(OBJECTS) erase $(TREELIB) tlib /P128 @&&! $(TREELIB) & +$(OBJECTS:.obj =.obj +) ! test.obj: test.$(SRCSUFF) test.res : test.rc $(WXDIR)\include\msw\wx.rc rc /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -r test test.exe: test.obj test.def test.res $(TREELIB) tlink $(LINKFLAGS) @&&! c0wl.obj test.obj test nul $(LIBS) test.def ! rc -K test.res clean: -erase *.obj -erase *.exe -erase *.res -erase ..\lib\*.lib