X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=Makefile;h=a00d6bf960e42b094ebf6aa882087007656b1ae2;hb=f6b8f7f23bb8a4a5b30bfde8242578cca90ddacf;hp=3df2349670582e7e7aa607abbe0556beea729aab;hpb=66812a216aa78f33ddff8753dd62f8450ef3220a;p=scherzo diff --git a/Makefile b/Makefile index 3df2349..a00d6bf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ all: scherzo -scherzo_srcs = \ +scherzo_srcs := \ scherzo.c \ score.c @@ -10,7 +10,7 @@ WARN_CFLAGS = -Wall -Wextra SCHERZO_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags) `pkg-config --cflags gtk+-2.0` -SCHERZO_LDFLAGS = $(LDFLAGS) `pkg-config --libs gtk+-2.0` +SCHERZO_LDFLAGS = $(LDFLAGS) `pkg-config --libs gtk+-2.0` -ltalloc # The user has not set any verbosity, default to quiet mode and inform the # user how to enable verbose compiles. @@ -25,16 +25,16 @@ endif # Otherwise, print the full command line. quiet ?= $($(shell echo $1 | sed -e s'/ .*//')) -.deps/%.d: %.cpp $(global_deps) +.deps/%.d: %.c Makefile @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ - $(CXX) -M $(CPPFLAGS) $(FINAL_CXXFLAGS) $< > $@.$$$$ 2>/dev/null ; \ + $(CC) -M $(CPPFLAGS) $(SCHERZO_CFLAGS) $< > $@.$$$$ 2>/dev/null ; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ -DEPS := $(DEPS:%.cpp=.deps/%.d) +DEPS := $(scherzo_srcs:%.c=.deps/%.d) -include $(DEPS) -%.o: %.c $(global_deps) +%.o: %.c Makefile $(call quiet,CC $(CFLAGS)) -c $(SCHERZO_CFLAGS) $< -o $@ scherzo: $(scherzo_modules)