X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14d1ccd89decb9d84f394fb2218eddbfdba56baf..4aab34290a0c966bffc9e529dae5666b5db77c96:/samples/toolbar/makefile.unx diff --git a/samples/toolbar/makefile.unx b/samples/toolbar/makefile.unx index b01a514e9b..19849b2878 100644 --- a/samples/toolbar/makefile.unx +++ b/samples/toolbar/makefile.unx @@ -1,80 +1,71 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile for wxToolBar example (UNIX). -# Change the WXDIR directory, and CPPFLAGS and LDFLAGS, for your system. +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -WXDIR = ../.. -# All common UNIX compiler flags and options are now in -# this central makefile. -include $(WXDIR)/src/make.env -TOOLBARDIR = $(WXDIR)/samples/toolbar +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- -OBJECTS = $(OBJDIR)/wx_bbar.$(OBJSUFF) -TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) -TESTPROGRAM = $(TOOLBARDIR)/test$(GUISUFFIX) +# C++ compiler +CXX = g++ -LDFLAGS = $(XLIB) -L$(WXDIR)/lib +# Standard flags for C++ +CXXFLAGS = -XVIEWLDLIBS = -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS) -MOTIFLDLIBS = -lwx_motif -lXm -lXt -lX11 -lm $(COMPLIBS) -HPLDLIBS = -lwx_hp -lXm -lXt -lX11 -lm $(HPCOMPLIBS) -# Default -LDLIBS=$(XVIEWLDLIBS) +# Standard preprocessor flags (common for CC and CXX) +CPPFLAGS = -all: $(OBJDIR) $(TESTPROGRAM) +# Standard linker flags +LDFLAGS = -demo: $(TESTPROGRAM) +# Location and arguments of wx-config script +WX_CONFIG = wx-config -.SUFFIXES: +# C++ flags to use with wxWidgets code +WX_CXXFLAGS = `$(WX_CONFIG) --cxxflags` -wx: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx GUI=$(GUI) -motif: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif OPT='$(OPT)' - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= -demo_motif: - $(MAKE) -f makefile.unx all demo GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK= +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- -xview: - cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)' - $(MAKE) -f makefile.unx GUI=-Dwx_xview OPT='$(OPT)' +### Variables: ### -demo_ol: - $(MAKE) -f makefile.unx all demo GUI=-Dwx_xview OPT='$(OPT)' +CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD +TOOLBAR_CXXFLAGS = -I. $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) +TOOLBAR_OBJECTS = \ + toolbar_toolbar.o -hp: - $(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' OPT='' WARN='-w' \ - XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' CCLEX='cc' \ - LDLIBS='$(HPLDLIBS)' -$(OBJDIR): - mkdir $(OBJDIR) +### Conditionally set variables: ### -$(OBJDIR)/test.$(OBJSUFF): test.h test.$(SRCSUFF) - $(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF) -$(TESTPROGRAM): $(OBJDIR)/test.$(OBJSUFF) $(WXLIB) - $(CC) $(LDFLAGS) -o test$(GUISUFFIX) $(OBJDIR)/test.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS) -cleaneach: - rm -f $(OBJECTS) test$(GUISUFFIX) $(OBJDIR)/test.$(OBJSUFF) core +### Targets: ### -clean_motif: - $(MAKE) -f makefile.unx GUISUFFIX=_motif cleaneach +all: toolbar -clean_ol: - $(MAKE) -f makefile.unx GUISUFFIX=_ol cleaneach +install: all -clean_hp: - $(MAKE) -f makefile.unx GUISUFFIX=_hp cleaneach +uninstall: +clean: + rm -f ./*.o + rm -f ./*.d + rm -f toolbar + +toolbar: $(TOOLBAR_OBJECTS) + $(CXX) -o $@ $(TOOLBAR_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) --libs core,base` + +toolbar_toolbar.o: ./toolbar.cpp + $(CXX) -c -o $@ $(TOOLBAR_CXXFLAGS) $(CPPDEPS) $< + +.PHONY: all install uninstall clean + + +# Dependencies tracking: +-include ./*.d