diff options
author | Thorsten Wißmann <edu@thorsten-wissmann.de> | 2011-07-22 19:46:08 +0200 |
---|---|---|
committer | Thorsten Wißmann <edu@thorsten-wissmann.de> | 2011-07-22 19:46:08 +0200 |
commit | 80e3b6f1c780ed77459422874a29d89163dc6682 (patch) | |
tree | 438679f685022284e165efebfebbd68524c9eabc /Makefile | |
parent | 92c54e1dadc64a3889a273d5e83130b1c18be39d (diff) |
some Makefile refactoring
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 1 insertions, 31 deletions
@@ -8,35 +8,5 @@ HEADER = $(wildcard $(SRCDIR)/*.h) OBJ = ${SRC:.c=.o} TARGET = herbstluftwm -# colors -COLOR_ACTION = "\e[1;33m" -COLOR_FILE = "\e[1;32m" -COLOR_BRACKET = "\e[0;34m" -COLOR_NORMAL = "\e[0m" -define colorecho - @echo -e $(COLOR_BRACKET)" ["$(COLOR_ACTION)$1$(COLOR_BRACKET)"] " $(COLOR_FILE)$2$(COLOR_BRACKET)... $(COLOR_NORMAL) -endef - - -all: $(TARGET) - -rb: clean all - -$(TARGET): $(OBJ) - $(call colorecho,LD,$(TARGET)) - @$(LD) -o $@ $(LDFLAGS) $(OBJ) - - -$(SRCDIR)/%.o: $(SRCDIR)/%.c $(HEADER) - $(call colorecho,CC,$<) - @$(CC) -c $(CFLAGS) -o $@ $< - - -clean: - $(call colorecho,RM,$(TARGET)) - @rm -f $(TARGET) - $(call colorecho,RM,$(OBJ)) - @rm -f $(OBJ) - -.PHONY: all clean rb +include rules.mk |