X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4fda16bb0d3b9b5fae6d289e4c3a93701fa4839..06b781c7c630ff8c2ab30211cb4351b4cb5bfb47:/samples/caret/makefile.unx?ds=sidebyside 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)