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 # An alternative to editing this file is to create a shell script
9 # to export specific variables, and call make with the -e switch
10 # to override makefile variables. See wx/install/install.txt.
11 # And you can override specific variables on the make command line, e.g.
13 # make -f makefile.unix DEBUG=''
15 # You may prefer to use the GNU configure script than raw makefiles -
16 # see contrib/wxshlib.
19 ########################### Programs #################################
21 # Replace this with your own path if necessary
22 WXDIR = /home/jacs/wx2
30 # Compiler for lex/yacc .c programs
39 ############################ Switches #################################
41 # Debug/trace mode. 1 or more for debugging.
43 GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
46 ########################## Compiler flags #############################
49 OPTIONS = -D__WXDEBUG__ -DWXDEBUG
53 WARN = -Wall -Wno-unused # -w
54 CWARN = -Wall -Wno-unused # -w
57 ############################ Includes #################################
59 # Compiler or system-specific include paths
61 XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
62 -I/usr/include/X11/Xm -I/usr/include
63 XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
65 ############################ Libraries ################################
68 GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm
70 ############################# Suffixes ################################
72 # Change cpp to c if you want to use main.c instead of main.cpp.
73 # Edit wx_setup.h accordingly (USE_C_MAIN=1)
79 ####################### No changes below this line ####################
81 WXINC = $(WXDIR)/include
82 WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
83 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
85 # Directory for object files
86 OBJDIR = objects$(GUISUFFIX)
88 CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
89 CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT)
90 LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
91 LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
93 # Clears all default suffixes
97 $(CC) -c $(CFLAGS) -o $@ $<
100 $(CC) -c $(CPPFLAGS) -o $@ $<
102 ####################### Targets to allow multiple GUIs ####################
105 echo Use a target: one of motif, stubs
108 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
111 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
114 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
117 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'