]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/bombs/makefile.unx
makefile updates,
[wxWidgets.git] / samples / bombs / makefile.unx
index 738e5f4cec74a87f26498ab293b5d21baf062bb3..9b4f82a5016005cf729a0c26a5544ee55887b25c 100644 (file)
@@ -17,18 +17,19 @@ CC = gcc
 
 PROGRAM = bombs
 
-$(PROGRAM): $(PROGRAM).o game.o bombs1.o
-       $(CC) -o $(PROGRAM) \
-       $(PROGRAM).o bombs1.o game.o `wx-config --libs`
-
-$(PROGRAM).o: $(PROGRAM).cpp
-       $(CC) `wx-config --cflags` -c $(PROGRAM).cpp
-
-game.o: game.cpp
-       $(CC) `wx-config --cflags` -c game.cpp
-       
-bombs1.o: bombs1.cpp
-       $(CC) `wx-config --cflags` -c bombs1.cpp
+OBJECTS = $(PROGRAM).o game.o bombs1.o
+
+# implementation
+
+.SUFFIXES:     .o .cpp
+
+.cpp.o :
+       $(CC) -c `wx-config --cflags` -o $@ $<
+
+all:    $(PROGRAM)
+
+$(PROGRAM):    $(OBJECTS)
+       $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
 
 clean: 
        rm -f *.o $(PROGRAM)