DSS_CFLAGS += -Wbad-function-cast
DSS_CFLAGS += -Wshadow
+.ONESHELL:
+.SHELLFLAGS := -ec
+ifeq ("$(origin V)", "command line")
+ SAY =
+else
+ SAY = @printf '%s\n' '$(strip $(1))'
+endif
version.c:
+ $(call SAY, VG $@)
./version-gen.sh dss version.c > /dev/null
dss: $(objs)
+ $(call SAY, LD $@)
$(CC) -o $@ $(objs) $(LDFLAGS) -llopsub
%.o: %.c
+ $(call SAY, CC $<)
$(CC) -c -o $@ $(DSS_CPPFLAGS) $(CPPFLAGS) $(DSS_CFLAGS) $(CFLAGS) \
-MMD -MF $(*F).d -MT $@ $<
%.lsg.h: %.suite
+ $(call SAY, LSGH $<)
lopsubgen --gen-h=$@ < $<
%.lsg.c: %.suite
+ $(call SAY, LSGC $<)
lopsubgen --gen-c=$@ < $<
%.1: %.suite
+ $(call SAY, LSGM $<)
lopsubgen --gen-man=$@ --version-string=$(VERSION) < $<
-
%.1.html: %.1
+ $(call SAY, GROFF $<)
groff -m man -Thtml -P -l -P -r $< | sed -e '1,/^<body>/d; /^<\/body>/,$$d' > $@
-
clean:
+ $(call SAY, CLEAN)
rm -f *.[od] dss dss.1 *.html dss.lsg.[ch] version.c
ifneq ($(findstring strip, $(MAKECMDGOALS)),)