X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4fda16bb0d3b9b5fae6d289e4c3a93701fa4839..07215d86e03dd4f80a578b4e27d01e58bf2b28dd:/samples/caret/makefile.unx diff --git a/samples/caret/makefile.unx b/samples/caret/makefile.unx index f380360806..f82a4c5990 100644 --- a/samples/caret/makefile.unx +++ b/samples/caret/makefile.unx @@ -13,16 +13,23 @@ # under Linux. # -CC = gcc +CXX = $(shell wx-config --cxx) PROGRAM = caret -$(PROGRAM): $(PROGRAM).o - $(CC) -o $(PROGRAM) \ - $(PROGRAM).o `wx-config --libs` +OBJECTS = $(PROGRAM).o -$(PROGRAM).o: $(PROGRAM).cpp - $(CC) `wx-config --cflags` -c $(PROGRAM).cpp +# implementation + +.SUFFIXES: .o .cpp + +.cpp.o : + $(CXX) -c `wx-config --cxxflags` -o $@ $< + +all: $(PROGRAM) + +$(PROGRAM): $(OBJECTS) + $(CXX) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` clean: rm -f *.o $(PROGRAM)