X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4fda16bb0d3b9b5fae6d289e4c3a93701fa4839..a8f6ef519066976e75833343952f7b6dd70dafa0:/samples/checklst/makefile.unx diff --git a/samples/checklst/makefile.unx b/samples/checklst/makefile.unx index 9b7e114a7f..851d4cfca3 100644 --- a/samples/checklst/makefile.unx +++ b/samples/checklst/makefile.unx @@ -13,16 +13,23 @@ # under Linux. # -CC = gcc - PROGRAM = checklst -$(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)