-#
-# 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.
+# Purpose: makefile for toolbar example (Unix)
+# Created: 2000-03-14
-WXDIR = ../..
+CC = gcc
-# All common UNIX compiler flags and options are now in
-# this central makefile.
-include $(WXDIR)/src/make.env
+PROGRAM = toolbar
-TOOLBARDIR = $(WXDIR)/samples/toolbar
+OBJECTS = $(PROGRAM).o
-OBJECTS = $(OBJDIR)/wx_bbar.$(OBJSUFF)
-TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF)
-TESTPROGRAM = $(TOOLBARDIR)/test$(GUISUFFIX)
+# implementation
-LDFLAGS = $(XLIB) -L$(WXDIR)/lib
+.SUFFIXES: .o .cpp
-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)
+.cpp.o :
+ $(CC) -c `wx-config --cflags` -o $@ $<
-all: $(OBJDIR) $(TESTPROGRAM)
+all: $(PROGRAM)
-demo: $(TESTPROGRAM)
-
-.SUFFIXES:
-
-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=
-
-xview:
- cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview OPT='$(OPT)'
- $(MAKE) -f makefile.unx GUI=-Dwx_xview OPT='$(OPT)'
-
-demo_ol:
- $(MAKE) -f makefile.unx all demo GUI=-Dwx_xview OPT='$(OPT)'
-
-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)
-
-$(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
-
-clean_motif:
- $(MAKE) -f makefile.unx GUISUFFIX=_motif cleaneach
-
-clean_ol:
- $(MAKE) -f makefile.unx GUISUFFIX=_ol cleaneach
-
-clean_hp:
- $(MAKE) -f makefile.unx GUISUFFIX=_hp cleaneach
+$(PROGRAM): $(OBJECTS)
+ $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
+clean:
+ rm -f *.o $(PROGRAM)