X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4fda16bb0d3b9b5fae6d289e4c3a93701fa4839..e4277538a535d6d6c049f0b0ead9ed2b07cd93f2:/samples/dnd/makefile.unx?ds=inline diff --git a/samples/dnd/makefile.unx b/samples/dnd/makefile.unx index 00993a6cff..fbb90b2456 100644 --- a/samples/dnd/makefile.unx +++ b/samples/dnd/makefile.unx @@ -13,16 +13,23 @@ # 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)