summaryrefslogtreecommitdiffstats
path: root/common.mak
diff options
context:
space:
mode:
Diffstat (limited to 'common.mak')
-rw-r--r--common.mak6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.mak b/common.mak
index bd21046..da51495 100644
--- a/common.mak
+++ b/common.mak
@@ -20,6 +20,9 @@ TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
+TOOLS += $(TOOLS-yes)
+TOOLOBJS := $(TOOLS:%=tools/%.o)
+TOOLS := $(TOOLS:%=tools/%$(EXESUF))
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
@@ -28,6 +31,8 @@ SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
+alltools: $(TOOLS)
+
$(HOSTOBJS): %.o: %.c
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
@@ -37,6 +42,7 @@ $(HOSTPROGS): %$(HOSTEXESUF): %.o
$(OBJS): | $(dir $(OBJS))
$(HOSTOBJS): | $(dir $(HOSTOBJS))
$(TESTOBJS): | $(dir $(TESTOBJS))
+$(TOOLOBJS): | tools
OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS))
OpenPOWER on IntegriCloud