X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/samples/minimal/makefile.unx?ds=sidebyside diff --git a/samples/minimal/makefile.unx b/samples/minimal/makefile.unx index 9685d06789..2e6be9375f 100644 --- a/samples/minimal/makefile.unx +++ b/samples/minimal/makefile.unx @@ -1,58 +1,49 @@ # -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 +# File: Makefile for samples +# Author: Robert Roebling +# Created: 1999 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh +# Copyright: (c) 1998 Robert Roebling # -# "%W% %G%" -# -# Makefile for minimal example (UNIX). - -WXDIR = ../.. - -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env - -OBJECTS = $(OBJDIR)/minimal.$(OBJSUFF) +# This makefile requires a Unix version of wxWindows +# to be installed on your system. This is most often +# done typing "make install" when using the complete +# sources of wxWindows or by installing the two +# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm +# under Linux. -.SUFFIXES: +# this makefile may also be used as a template for simple makefiles for your +# own programs, the comments explain which parts of it you may have to modify +# to use it for your own programs -all: $(OBJDIR) minimal$(GUISUFFIX) -wx: - - -motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK= +# you may change WX_CONFIG value to use a specific wx-config and to pass it +# some options, for example "--inplace" to use an uninstalled wxWindows +# version +# +# by default, wx-config from the PATH is used +WX_CONFIG := wx-config -xview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview - $(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' +# set this to the name of the main executable file +PROGRAM = minimal -hp: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)' +# if your program has more than one source file, add more .o files to the line +# below +OBJECTS = $(PROGRAM).o -$(OBJDIR): - mkdir $(OBJDIR) -minimal$(GUISUFFIX): $(OBJDIR)/minimal.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o minimal$(GUISUFFIX) $(OBJDIR)/minimal.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) +# you shouldn't have to edit anything below this line +CXX = $(shell $(WX_CONFIG) --cxx) -$(OBJDIR)/minimal.$(OBJSUFF): minimal.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ minimal.$(SRCSUFF) +.SUFFIXES: .o .cpp -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany +.cpp.o : + $(CXX) -c `$(WX_CONFIG) --cxxflags` -o $@ $< -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany +all: $(PROGRAM) -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany +$(PROGRAM): $(OBJECTS) + $(CXX) -o $(PROGRAM) $(OBJECTS) `$(WX_CONFIG) --libs` -cleanany: - rm -f $(OBJECTS) minimal$(GUISUFFIX) core +clean: + rm -f *.o $(PROGRAM)