LDLIBS += -lm
+.SUFFIXES:
+
+.PHONY: all $(PROGS) mostlyclean clean install uninstall
+
all: $(PROGS)
mostlyclean:
$(RM) -r ../wrk
-clean: mostlyclean
- $(RM) -r ../bin
+clean:
+ $(RM) -r ../wrk ../bin
install: all
$(foreach prog,$(PROGS),$(INSTALL_recipe))
uninstall:
$(foreach prog,$(PROGS),$(UNINSTALL_recipe))
-.PHONY: all $(PROGS) mostlyclean clean install uninstall
-
-.SUFFIXES:
-
##########
define INSTALL_recipe
$$($1_OBJS): | ../wrk/$1
../wrk/$1:
- mkdir -p $$@
+ @mkdir -p $$@
DEPS += $$($1_OBJS:.o=.d)
##########
../wrk/%.o: %.c
- @echo $(CC) $<
+ @echo $<
@$(CC) -c $(CFLAGS) -o $@ $<
../bin:
- mkdir $@
+ @mkdir $@
$(eval $(call OBJS_template,common))
../wrk/common/common.a: $(common_OBJS)