]>
Commit | Line | Data |
---|---|---|
0492c5a0 JS |
1 | # sgi.env |
2 | # SGI | |
3266f831 JS |
3 | # |
4 | # Common makefile settings for wxWindows programs | |
5 | # This file is included by all the other makefiles, thus changes | |
6 | # made here take effect everywhere (except where overriden). | |
0492c5a0 | 7 | # RCS-ID: $Id$ |
3266f831 JS |
8 | # |
9 | ########################### Programs ################################# | |
10 | ||
11 | # Replace this with your own path if necessary | |
0492c5a0 JS |
12 | WXWIN = /home/jds/wx2 |
13 | WXDIR = $(WXWIN) | |
3266f831 JS |
14 | |
15 | # C++ compiler | |
0492c5a0 | 16 | CC = CC |
3266f831 JS |
17 | |
18 | # C compiler | |
0492c5a0 | 19 | CCC = cc |
3266f831 JS |
20 | |
21 | # Compiler for lex/yacc .c programs | |
22 | CCLEX = $(CCC) | |
23 | ||
0492c5a0 | 24 | LEX = lex |
3266f831 | 25 | YACC = yacc |
777553d2 JS |
26 | # Note: if using bison, use -y option for yacc compatibility |
27 | # YACC = bison -y | |
3266f831 JS |
28 | MAKE = make |
29 | AROPTIONS = ruv | |
0492c5a0 | 30 | RANLIB = echo |
3266f831 JS |
31 | |
32 | ############################ Switches ################################# | |
33 | ||
34 | # Debug/trace mode. 1 or more for debugging. | |
35 | DEBUG = 0 | |
36 | GUI = -D__WXSTUBS__ -D__UNIX__ | |
37 | GUISUFFIX = _stubs | |
38 | ||
39 | ########################## Compiler flags ############################# | |
40 | ||
41 | # Misc options | |
0492c5a0 JS |
42 | OPTIONS = -32 -D__WXDEBUG__ -D__SGI__ -D__SGI_CC__ |
43 | COPTIONS = -32 -Xcpluscomm -D__SGI__ -D__SGI_CC__ | |
44 | DEBUGFLAGS = -g3 | |
3266f831 | 45 | INCLUDE = |
0492c5a0 JS |
46 | WARN = -w |
47 | CWARN = -w | |
48 | OPT = | |
3266f831 JS |
49 | |
50 | ############################ Includes ################################# | |
51 | ||
52 | # Compiler or system-specific include paths | |
0492c5a0 | 53 | COMPPATHS = |
3266f831 JS |
54 | XINCLUDE = -I/usr/include/X11 -I/usr/include/Xm \ |
55 | -I/usr/include/X11/Xm -I/usr/include | |
56 | XLIB = -L/usr/local/X11/lib -L/usr/X11/lib -L/usr/X11R6/lib | |
57 | ||
58 | ############################ Libraries ################################ | |
59 | ||
0492c5a0 JS |
60 | COMPLIBS = |
61 | #COMPLIBS = -lstdc++ | |
62 | #COMPLIBS = -lPW | |
3266f831 JS |
63 | GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm |
64 | ||
65 | ############################# Suffixes ################################ | |
66 | ||
3266f831 JS |
67 | OBJSUFF =o |
68 | SRCSUFF =cpp | |
69 | MAINSUFF =cpp | |
70 | ||
71 | ####################### No changes below this line #################### | |
72 | ||
73 | WXINC = $(WXDIR)/include | |
74 | WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a | |
75 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) | |
76 | ||
77 | # Directory for object files | |
78 | OBJDIR = objects$(GUISUFFIX) | |
79 | ||
75737d05 JS |
80 | CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) |
81 | CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) | |
3266f831 JS |
82 | LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib |
83 | LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) | |
84 | ||
85 | # Clears all default suffixes | |
86 | .SUFFIXES: .o .cpp .c | |
87 | ||
88 | .c.o : | |
89 | $(CCC) -c $(CFLAGS) -o $@ $< | |
90 | ||
91 | .cpp.o : | |
92 | $(CC) -c $(CPPFLAGS) -o $@ $< | |
93 | ||
94 | .C.o : | |
95 | $(CC) -c $(CPPFLAGS) -o $@ $< | |
96 | ||
97 | ####################### Targets to allow multiple GUIs #################### | |
98 | ||
99 | dummy: | |
100 | echo Use a target: one of motif, stubs | |
101 | ||
102 | stubs: | |
acbd13a3 | 103 | make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' |
3266f831 JS |
104 | |
105 | motif: | |
acbd13a3 | 106 | make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm' |
3266f831 JS |
107 | |
108 | gtk: | |
acbd13a3 | 109 | make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread' |
3266f831 JS |
110 | |
111 | cleanstubs: | |
acbd13a3 | 112 | make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' |
3266f831 JS |
113 | |
114 | cleanmotif: | |
acbd13a3 JS |
115 | make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' |
116 | ||
3266f831 JS |
117 | $(OBJDIR): |
118 | mkdir $(OBJDIR) | |
119 |