# # File: makefile.unx # Author: Julian Smart # Created: 1993 # Updated: # Copyright: (c) 1993, AIAI, University of Edinburgh # # "%W% %G%" # # Makefile for tree library and example (UNIX). # Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system. WXDIR = ../../.. # All common UNIX compiler flags and options are now in # this central makefile. include $(WXDIR)/src/make.env TREEDIR = $(WXDIR)/utils/wxtree TREEINC = $(TREEDIR)/src TREELIB = $(TREEDIR)/lib/libwxtree$(GUISUFFIX).a SOURCES = tree.$(SRCSUFF) HEADERS = tree.h OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF) TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) TESTPROGRAM = $(TREEDIR)/src/test$(GUISUFFIX) DOCUTILSDIR = $(WXDIR)/utils/tex2rtf/src LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TREEDIR)/lib XVIEWLDLIBS = -lwxtree_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS) MOTIFLDLIBS = -lwxtree_motif -lwx_motif -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS) HPLDLIBS = -lwxtree_hp -lwx_hp -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS) # Default LDLIBS=$(XVIEWLDLIBS) .SUFFIXES: all: $(OBJDIR) $(TREELIB) demo: $(TESTPROGRAM) $(TREELIB): $(OBJECTS) rm -f $@ ar $(AROPTIONS) $@ $(OBJECTS) $(RANLIB) $@ wxmotif: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif DEBUG='$(DEBUG)' wxxview: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview DEBUG='$(DEBUG)' motif: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif OPT='$(OPT)' DEBUG='$(DEBUG)' $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= xview: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)' $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)' DEBUG='$(DEBUG)' demo_motif: $(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= demo_ol: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)' $(MAKE) -f makefile.unx all test_ol GUI=-Dwx_xview OPT='$(OPT)' DEBUG='$(DEBUG)' hp: $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ LDLIBS='$(HPLDLIBS)' demo_hp: $(MAKE) -f makefile.unx all test_hp GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \ XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ LDLIBS='$(HPLDLIBS)' $(OBJDIR): mkdir $(OBJDIR) test$(GUISUFFIX): $(OBJDIR)/test.$(OBJSUFF) $(WXLIB) $(TREELIB) $(CC) $(LDFLAGS) -o test$(GUISUFFIX) $(OBJDIR)/test.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) $(OBJDIR)/wxtree.$(OBJSUFF): wxtree.$(SRCSUFF) wxtree.h $(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF) $(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) test.h wxtree.h $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) HTMLDIR=/home/hardy/html/wx/manuals docs: ps xlp ps: $(TREEDIR)/docs/manual.ps xlp: $(TREEDIR)/docs/wxtree.xlp html: $(HTMLDIR)/wxtree/wxtree_contents.html $(TREEDIR)/docs/wxtree.xlp: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex cd ../docs; tex2rtf manual.tex tmp.xlp -xlp -twice sed -e "s/WXHELPCONTENTS/wxTree Manual/g" < $(TREEDIR)/docs/tmp.xlp > $(TREEDIR)/docs/wxtree.xlp /bin/rm -f $(TREEDIR)/docs/tmp.xlp $(HTMLDIR)/wxtree/wxtree_contents.html: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex cd ../docs; tex2rtf manual.tex $(HTMLDIR)/wxtree/wxtree.html -html -twice $(TREEDIR)/docs/manual.dvi: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex cd $(TREEDIR)/docs; latex manual; latex manual; makeindex manual; bibtex manual; latex manual; latex manual $(TREEDIR)/docs/manual.ps: $(TREEDIR)/docs/manual.dvi cd $(TREEDIR)/docs; dvips -f -r < manual.dvi > manual.ps clean_motif: $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany clean_ol: $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany clean_hp: $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany cleanany: rm -f $(OBJECTS) $(OBJDIR)/*.$(OBJSUFF) test$(GUISUFFIX) $(TREELIB) core wxclean_ol: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol wxclean_motif: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif wxclean_hp: cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp