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).
9 ########################### Programs #################################
11 # Replace this with your own path if necessary
20 # Compiler for lex/yacc .c programs
25 # Note: if using bison, use -y option for yacc compatibility
31 ############################ Switches #################################
33 # Debug/trace mode. 1 or more for debugging.
35 GUI = -D__WXSTUBS__ -D__UNIX__
38 ########################## Compiler flags #############################
41 OPTIONS = -D__LINUX__ -D__WXDEBUG__
45 WARN = -Wall -Wno-unused # -w
46 CWARN = -Wall -Wno-unused # -w
49 ############################ Includes #################################
51 # Compiler or system-specific include paths
53 XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
54 -I/usr/include/X11/Xm -I/usr/include -I/usr/local/include \
55 -I/usr/lib/glib/include -I/usr/local/lib/glib/include
56 XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
58 ############################ Libraries ################################
61 GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
63 ############################# Suffixes ################################
65 # Change cpp to c if you want to use main.c instead of main.cpp.
66 # Edit wx_setup.h accordingly (USE_C_MAIN=1)
72 ####################### No changes below this line ####################
74 WXINC = $(WXDIR)/include
75 WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
76 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(COMPPATHS)
78 # Directory for object files
79 OBJDIR = objects$(GUISUFFIX)
81 CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
82 CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
83 LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
84 LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
86 # Clears all default suffixes
90 $(CCC) -c $(CFLAGS) -o $@ $<
93 $(CC) -c $(CPPFLAGS) -o $@ $<
96 $(CC) -c $(CPPFLAGS) -o $@ $<
98 ####################### Targets to allow multiple GUIs ####################
101 echo Use a target: one of motif, stubs
104 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
107 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm'
110 make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk $(COMPLIBS) -ldl `gtk-config --libs` -lX11 -lm -pthread'
113 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
116 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
119 make -f makefile.unx clean GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk'