X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4fda16bb0d3b9b5fae6d289e4c3a93701fa4839..abb69c6c82d61cf18f14270650a68896a3d8ed47:/samples/caret/makefile.unx diff --git a/samples/caret/makefile.unx b/samples/caret/makefile.unx index f380360806..798e3973be 100644 --- a/samples/caret/makefile.unx +++ b/samples/caret/makefile.unx @@ -17,12 +17,19 @@ CC = gcc 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 : + $(CC) -c `wx-config --cflags` -o $@ $< + +all: $(PROGRAM) + +$(PROGRAM): $(OBJECTS) + $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` clean: rm -f *.o $(PROGRAM)