]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dnd/makefile.unx
added wxGetTopLevelParent()
[wxWidgets.git] / samples / dnd / makefile.unx
index 00993a6cffdcd4c5921af174276307d24b143908..fbb90b2456160698ae8616b95235f8a47fdfadf4 100644 (file)
 # under Linux.
 #
 
-CC = gcc
-
 PROGRAM = dnd
 
-$(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)