]> git.cworth.org Git - scherzo/blob - Makefile
Make the brace and clef symbols scale with the staff.
[scherzo] / Makefile
1 all: scherzo
2
3 scherzo_srcs =          \
4         scherzo.c       \
5         score.c
6
7 scherzo_modules = $(scherzo_srcs:.c=.o)
8
9 WARN_CFLAGS = -Wall -Wextra
10
11 SCHERZO_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags) `pkg-config --cflags gtk+-2.0`
12
13 SCHERZO_LDFLAGS = $(LDFLAGS) `pkg-config --libs gtk+-2.0` -ltalloc
14
15 # The user has not set any verbosity, default to quiet mode and inform the
16 # user how to enable verbose compiles.
17 ifeq ($(V),)
18 quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n"
19 quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)"$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//'))
20 endif
21 # The user has explicitly enabled quiet compilation.
22 ifeq ($(V),0)
23 quiet = @printf "$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//'))
24 endif
25 # Otherwise, print the full command line.
26 quiet ?= $($(shell echo $1 | sed -e s'/ .*//'))
27
28 .deps/%.d: %.cpp $(global_deps)
29         @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \
30         $(CXX) -M $(CPPFLAGS) $(FINAL_CXXFLAGS) $< > $@.$$$$ 2>/dev/null ; \
31         sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \
32         rm -f $@.$$$$
33
34 DEPS := $(DEPS:%.cpp=.deps/%.d)
35 -include $(DEPS)
36
37 %.o: %.c $(global_deps)
38         $(call quiet,CC $(CFLAGS)) -c $(SCHERZO_CFLAGS) $< -o $@
39
40 scherzo: $(scherzo_modules)
41         $(call quiet,CC $(CFLAGS)) $^ $(SCHERZO_LDFLAGS) -o $@
42
43 CLEAN := $(CLEAN) scherzo $(chorale_modules)
44
45 .PHONY : clean
46 clean:
47         rm -f $(CLEAN); rm -rf .deps
48