3 $(1) $(1)%: BUILD_DIR := $(1)
4 $(1) $(1)%: CFLAGS += $$($(1)-eflags)
6 $(Q)echo "$(bold)$(WHAT) $(1):$(normal)"
7 $(1): $(1)_prehook $$($(1)-lex) $$($(1)-yaac) $$(patsubst %.o,$(1)/%.o,$$($(1)-objs))
8 $(1)_clean: $(1)_clean_custom
9 $(Q)$$(call RM,$(1)/*.o $(1)/$(1) $(1)/*.gz)
10 $(1)_install: $(1)_install_custom
11 $(Q)$$(call INSTX,$(1)/$(1),$$(SBINDIR))
12 $(Q)$(GZIP) $(1).8 > $(1)/$(1).8.gz
13 $(Q)$$(call INSTX,$(1)/$(1).8.gz,$$(MAN8DIR))
14 $(1)_uninstall: $(1)_uninstall_custom
15 $(Q)$$(call RM,$$(SBINDIR)/$(1))
16 $(Q)$$(call RM,$$(MAN8DIR)/$(1).8.gz)
17 $(1)/%.yy.o: $(1)/%.yy.c
18 $$(CC) $$(CFLAGS) -o $$@ -c $$<
19 $(1)/%.tab.o: $(1)/%.tab.c
20 $$(CC) $$(CFLAGS) -o $$@ -c $$<
22 $$(CC) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<