]>
Commit | Line | Data |
---|---|---|
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 | ||
13 | WXDIR = ../../.. | |
14 | ||
15 | # All common UNIX compiler flags and options are now in | |
16 | # this central makefile. | |
17 | include $(WXDIR)/src/make.env | |
18 | ||
19 | TREEDIR = $(WXDIR)/utils/wxtree | |
20 | TREEINC = $(TREEDIR)/src | |
21 | TREELIB = $(TREEDIR)/lib/libwxtree$(GUISUFFIX).a | |
22 | ||
23 | SOURCES = tree.$(SRCSUFF) | |
24 | HEADERS = tree.h | |
25 | OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF) | |
26 | ||
27 | TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) | |
28 | TESTPROGRAM = $(TREEDIR)/src/test$(GUISUFFIX) | |
29 | ||
30 | DOCUTILSDIR = $(WXDIR)/utils/tex2rtf/src | |
31 | ||
32 | LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TREEDIR)/lib | |
33 | ||
34 | XVIEWLDLIBS = -lwxtree_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS) | |
35 | MOTIFLDLIBS = -lwxtree_motif -lwx_motif -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS) | |
36 | HPLDLIBS = -lwxtree_hp -lwx_hp -lXm -lXmu -lXt -lX11 -lm $(COMPLIBS) | |
37 | # Default | |
38 | LDLIBS=$(XVIEWLDLIBS) | |
39 | ||
40 | .SUFFIXES: | |
41 | ||
42 | all: $(OBJDIR) $(TREELIB) | |
43 | ||
44 | demo: $(TESTPROGRAM) | |
45 | ||
46 | $(TREELIB): $(OBJECTS) | |
47 | rm -f $@ | |
48 | ar $(AROPTIONS) $@ $(OBJECTS) | |
49 | $(RANLIB) $@ | |
50 | ||
51 | wxmotif: | |
52 | cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif DEBUG='$(DEBUG)' | |
53 | ||
54 | wxxview: | |
55 | cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview DEBUG='$(DEBUG)' | |
56 | ||
57 | motif: | |
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 | ||
61 | xview: | |
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 | ||
65 | demo_motif: | |
66 | $(MAKE) -f makefile.unx all test_motif GUI=-Dwx_motif GUISUFFIX=_motif DEBUG='$(DEBUG)' OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= | |
67 | ||
68 | demo_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 | ||
72 | hp: | |
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 | ||
77 | demo_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 | ||
85 | test$(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 | ||
94 | HTMLDIR=/home/hardy/html/wx/manuals | |
95 | docs: ps xlp | |
96 | ps: $(TREEDIR)/docs/manual.ps | |
97 | xlp: $(TREEDIR)/docs/wxtree.xlp | |
98 | html: $(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 | ||
114 | clean_motif: | |
115 | $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany | |
116 | ||
117 | clean_ol: | |
118 | $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany | |
119 | ||
120 | clean_hp: | |
121 | $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany | |
122 | ||
123 | cleanany: | |
124 | rm -f $(OBJECTS) $(OBJDIR)/*.$(OBJSUFF) test$(GUISUFFIX) $(TREELIB) core | |
125 | ||
126 | wxclean_ol: | |
127 | cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_ol | |
128 | ||
129 | wxclean_motif: | |
130 | cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_motif | |
131 | ||
132 | wxclean_hp: | |
133 | cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx clean_hp |