-#
-# File: makefile.unx
-# Author: Terry Tompkins
-# Created: 1998
-# Updated:
-# Copyright: (c) 1998, Remstar International
-#
-# Makefile for wxDB (UNIX).
+# =========================================================================
+# This makefile was generated by
+# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
+# Do not modify, all changes will be overwritten!
+# =========================================================================
-OBJDIR=database
-OBJSUFF=.o
-SRCSUFF=.cpp
-WXDIR = $(WXWIN)
-# All common UNIX compiler flags and options are now in
-# this central makefile.
-include $(WXDIR)/src/make.env
-PROGRAM=database
+# -------------------------------------------------------------------------
+# These are configurable options:
+# -------------------------------------------------------------------------
-OBJECTS = $(OBJDIR)/$(PROGRAM).$(OBJSUFF) $(OBJDIR)/table.$(OBJSUFF) $(OBJDIR)/db.$(OBJSUFF) $(OBJDIR)/listdb.$(OBJSUFF)
+# C++ compiler
+CXX = g++
-.SUFFIXES:
+# Standard flags for C++
+CXXFLAGS =
-all: $(OBJDIR) $(PROGRAM)$(GUISUFFIX)
+# Standard preprocessor flags (common for CC and CXX)
+CPPFLAGS =
-wx:
+# Standard linker flags
+LDFLAGS =
+# Location and arguments of wx-config script
+WX_CONFIG = wx-config
-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=
+# C++ flags to use with wxWidgets code
+WX_CXXFLAGS = `$(WX_CONFIG) --cxxflags`
-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)'
-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)'
-$(OBJDIR):
- mkdir $(OBJDIR)
+# -------------------------------------------------------------------------
+# Do not modify the rest of this file!
+# -------------------------------------------------------------------------
-$(PROGRAM)$(GUISUFFIX): $(DUMMYOBJ) $(DBLIBS) $(OBJECTS) $(WXLIB)
- $(CC) $(LDFLAGS) -o $(PROGRAM)$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
+### Variables: ###
-$(OBJDIR)/$(PROGRAM).$(OBJSUFF): $(PROGRAM).$(SRCSUFF)
- $(CC) -c $(CPPFLAGS) -o $@ $(PROGRAM).$(SRCSUFF)
+CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD
+DBTEST_CXXFLAGS = -I. $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
+DBTEST_OBJECTS = \
+ dbtest_dbtest.o \
+ dbtest_listdb.o
-$(OBJDIR)/table.$(OBJSUFF): table.$(SRCSUFF)
- $(CC) -c $(CPPFLAGS) -o $@ table.$(SRCSUFF)
+### Conditionally set variables: ###
-$(OBJDIR)/db.$(OBJSUFF): db.$(SRCSUFF)
- $(CC) -c $(CPPFLAGS) -o $@ db.$(SRCSUFF)
-$(OBJDIR)/listdb.$(OBJSUFF): listdb.$(SRCSUFF)
- $(CC) -c $(CPPFLAGS) -o $@ listdb.$(SRCSUFF)
-clean_motif:
- $(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
+### Targets: ###
-clean_ol:
- $(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
+all: dbtest
-clean_hp:
- $(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
+install: all
-cleanany:
- rm -f $(OBJECTS) $(PROGRAM)$(GUISUFFIX) core
+uninstall:
+clean:
+ rm -f ./*.o
+ rm -f ./*.d
+ rm -f dbtest
+
+dbtest: $(DBTEST_OBJECTS)
+ $(CXX) -o $@ $(DBTEST_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) --libs dbgrid,odbc,adv,html,xml,core,base`
+
+dbtest_dbtest.o: ./dbtest.cpp
+ $(CXX) -c -o $@ $(DBTEST_CXXFLAGS) $(CPPDEPS) $<
+
+dbtest_listdb.o: ./listdb.cpp
+ $(CXX) -c -o $@ $(DBTEST_CXXFLAGS) $(CPPDEPS) $<
+
+.PHONY: all install uninstall clean
+
+
+# Dependencies tracking:
+-include ./*.d