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).
8 ########################### Programs #################################
10 # Replace this with your own path if necessary
11 #WXDIR = /home/karl/wxWindows
12 WXDIR = /home/jacs/wx2
20 # Compiler for lex/yacc .c programs
29 ############################ Switches #################################
31 # Debug/trace mode. 1 or more for debugging.
33 GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
36 ########################## Compiler flags #############################
39 OPTIONS = -D__WXDEBUG__
43 WARN = -Wall -Wno-unused # -w
44 CWARN = -Wall -Wno-unused # -w
47 ############################ Includes #################################
49 # Compiler or system-specific include paths
51 XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
52 -I/usr/include/X11/Xm -I/usr/include
53 XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
55 ############################ Libraries ################################
58 GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
60 ############################# Suffixes ################################
62 # Change cpp to c if you want to use main.c instead of main.cpp.
63 # Edit wx_setup.h accordingly (USE_C_MAIN=1)
69 ####################### No changes below this line ####################
71 WXINC = $(WXDIR)/include
72 WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
73 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
75 # Directory for object files
76 OBJDIR = objects$(GUISUFFIX)
78 CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
79 CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
80 LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
81 LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
83 # Clears all default suffixes
87 $(CCC) -c $(CFLAGS) -o $@ $<
90 $(CC) -c $(CPPFLAGS) -o $@ $<
93 $(CC) -c $(CPPFLAGS) -o $@ $<
95 ####################### Targets to allow multiple GUIs ####################
98 echo Use a target: one of motif, stubs
101 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
104 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm'
107 make -f makefile.unx all GUI='-D__WXGTK__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk $(COMPLIBS) -lXm -lXmu -lXpm -lX11 -lm'
110 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
113 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'