]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/config/makefile.unx
nicer version compilation fix for wxUSE_WCHAR_T=0 (why should we duplicate definition...
[wxWidgets.git] / samples / config / makefile.unx
index fd8e0e5b1ebf896ef087ba569d4129d4dd4896c7..8fae35710343ba9845d2497447ad139c203ae101 100644 (file)
 # under Linux.
 #
 
+PROGRAM = config
+
 CC = gcc
 
-PROGRAM = config
+OBJECTS = $(PROGRAM).o
+
+# implementation
+
+.SUFFIXES:     .o .cpp
+
+.cpp.o :
+       $(CC) -c `wx-config --cflags` -o $@ $<
 
-$(PROGRAM): $(PROGRAM).o
-       $(CC) -o $(PROGRAM) \
-       $(PROGRAM).o `wx-config --libs`
+all:    $(PROGRAM)
 
-$(PROGRAM).o: $(PROGRAM).cpp
-       $(CC) `wx-config --cflags` -c $(PROGRAM).cpp
+$(PROGRAM):    $(OBJECTS)
+       $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
 
 clean: 
        rm -f *.o $(PROGRAM)