]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/db/makefile.unx
applied patch #933086: "scrollbar stops compilation due to missing header"
[wxWidgets.git] / samples / db / makefile.unx
index ff2dd688217da0dc1ee2a840bcf1c939edc41157..816246660198bcacda1c6820ff2eb62ec8e57a8f 100644 (file)
 # 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)