X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4fda16bb0d3b9b5fae6d289e4c3a93701fa4839..c16d276354b116475bf85a0388b4b0f545da0f82:/samples/db/makefile.unx diff --git a/samples/db/makefile.unx b/samples/db/makefile.unx index ff2dd68821..8162466601 100644 --- a/samples/db/makefile.unx +++ b/samples/db/makefile.unx @@ -13,19 +13,23 @@ # under Linux. # -CC = gcc - PROGRAM = dbtest -$(PROGRAM): $(PROGRAM).o listdb.o - $(CC) -o $(PROGRAM) \ - $(PROGRAM).o listdb.o `wx-config --libs` +CXX = $(shell wx-config --cxx) + +OBJECTS = $(PROGRAM).o listdb.o + +# implementation + +.SUFFIXES: .o .cpp + +.cpp.o : + $(CXX) -c `wx-config --cxxflags` -o $@ $< + +all: $(PROGRAM) -$(PROGRAM).o: $(PROGRAM).cpp - $(CC) `wx-config --cflags` -c $(PROGRAM).cpp +$(PROGRAM): $(OBJECTS) + $(CXX) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -listdb.o: listdb.cpp - $(CC) `wx-config --cflags` -c listdb.cpp - clean: rm -f *.o $(PROGRAM)