]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/makefile.unx
Catching up to new common class interfaces.
[wxWidgets.git] / samples / controls / makefile.unx
index 28e0924dd8ea4981cd4fa982e2e0f36290a65ae7..6519d521e39013b7980899af0b25407eda7e5292 100644 (file)
 # under Linux.
 #
 
-CC = gcc
-
 PROGRAM = controls
 
-$(PROGRAM): $(PROGRAM).o
-       $(CC) -o $(PROGRAM) \
-       $(PROGRAM).o `wx-config --libs`
+CXX = $(shell wx-config --cxx)
+
+OBJECTS = $(PROGRAM).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`
 
 clean: 
        rm -f *.o $(PROGRAM)