]> git.saurik.com Git - wxWidgets.git/blame_incremental - utils/wxtree/src/makefile.unx
no message
[wxWidgets.git] / utils / wxtree / src / makefile.unx
... / ...
CommitLineData
1#
2# File: makefile.unx
3# Author: Julian Smart
4# Created: 1993
5# Updated:
6# Copyright: (c) 1993, AIAI, University of Edinburgh
7#
8# "%W% %G%"
9#
10# Makefile for tree library and example (UNIX).
11# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system.
12
13WXDIR = ../../..
14
15# All common UNIX compiler flags and options are now in
16# this central makefile.
17include $(WXDIR)/src/make.env
18
19TREEDIR = $(WXDIR)/utils/wxtree
20TREEINC = $(TREEDIR)/src
21TREELIB = $(TREEDIR)/lib/libwxtree$(GUISUFFIX).a
22
23SOURCES = tree.$(SRCSUFF)
24HEADERS = tree.h
25OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF)
26
27TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF)
28TESTPROGRAM = $(TREEDIR)/src/test$(GUISUFFIX)
29
30DOCUTILSDIR = $(WXDIR)/utils/tex2rtf/src
31
32LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TREEDIR)/lib
33
34XVIEWLDLIBS = -lwxtree_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS)
35MOTIFLDLIBS = -lwxtree_motif -lwx_motif -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS)
36HPLDLIBS = -lwxtree_hp -lwx_hp -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS)
37# Default
38LDLIBS=$(XVIEWLDLIBS)
39
40.SUFFIXES:
41
42all: $(OBJDIR) $(TREELIB)
43
44demo: $(TESTPROGRAM)
45
46$(TREELIB): $(OBJECTS)
47 rm -f $@
48 ar $(AROPTIONS) $@ $(OBJECTS)
49 $(RANLIB) $@
50
51wxmotif:
52 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif DEBUG='$(DEBUG)'
53
54wxxview:
55 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview DEBUG='$(DEBUG)'
56
57motif:
58 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif OPT='$(OPT)' DEBUG='$(DEBUG)'
59 $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
60
61xview:
62 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)'
63 $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol OPT='$(OPT)' DEBUG='$(DEBUG)'
64
65demo_motif:
66 $(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
67
68demo_ol:
69 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' DEBUG='$(DEBUG)'
70 $(MAKE) -f makefile.unx all test_ol GUI=-Dwx_xview OPT='$(OPT)' DEBUG='$(DEBUG)'
71
72hp:
73 $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
74 XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
75 LDLIBS='$(HPLDLIBS)'
76
77demo_hp:
78 $(MAKE) -f makefile.unx all test_hp GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
79 XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \
80 LDLIBS='$(HPLDLIBS)'
81
82$(OBJDIR):
83 mkdir $(OBJDIR)
84
85test$(GUISUFFIX): $(OBJDIR)/test.$(OBJSUFF) $(WXLIB) $(TREELIB)
86 $(CC) $(LDFLAGS) -o test$(GUISUFFIX) $(OBJDIR)/test.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
87
88$(OBJDIR)/wxtree.$(OBJSUFF): wxtree.$(SRCSUFF) wxtree.h
89 $(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF)
90
91$(OBJDIR)/test.$(OBJSUFF): test.$(SRCSUFF) test.h wxtree.h
92 $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF)
93
94HTMLDIR=/home/hardy/html/wx/manuals
95docs: ps xlp
96ps: $(TREEDIR)/docs/manual.ps
97xlp: $(TREEDIR)/docs/wxtree.xlp
98html: $(HTMLDIR)/wxtree/wxtree_contents.html
99
100$(TREEDIR)/docs/wxtree.xlp: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex
101 cd ../docs; tex2rtf manual.tex tmp.xlp -xlp -twice
102 sed -e "s/WXHELPCONTENTS/wxTree Manual/g" < $(TREEDIR)/docs/tmp.xlp > $(TREEDIR)/docs/wxtree.xlp
103 /bin/rm -f $(TREEDIR)/docs/tmp.xlp
104
105$(HTMLDIR)/wxtree/wxtree_contents.html: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex
106 cd ../docs; tex2rtf manual.tex $(HTMLDIR)/wxtree/wxtree.html -html -twice
107
108$(TREEDIR)/docs/manual.dvi: $(TREEDIR)/docs/manual.tex $(TREEDIR)/docs/classes.tex
109 cd $(TREEDIR)/docs; latex manual; latex manual; makeindex manual; bibtex manual; latex manual; latex manual
110
111$(TREEDIR)/docs/manual.ps: $(TREEDIR)/docs/manual.dvi
112 cd $(TREEDIR)/docs; dvips -f -r < manual.dvi > manual.ps
113
114clean_motif:
115 $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
116
117clean_ol:
118 $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
119
120clean_hp:
121 $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
122
123cleanany:
124 rm -f $(OBJECTS) $(OBJDIR)/*.$(OBJSUFF) test$(GUISUFFIX) $(TREELIB) core
125
126wxclean_ol:
127 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol
128
129wxclean_motif:
130 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif
131
132wxclean_hp:
133 cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp