summaryrefslogtreecommitdiff
path: root/polux/application/agent/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'polux/application/agent/Makefile')
-rw-r--r--polux/application/agent/Makefile21
1 files changed, 19 insertions, 2 deletions
diff --git a/polux/application/agent/Makefile b/polux/application/agent/Makefile
index 66d317a6cb..f48c9bffbd 100644
--- a/polux/application/agent/Makefile
+++ b/polux/application/agent/Makefile
@@ -229,9 +229,26 @@ STUB_TEST_SRCDIR=test/stub/src
all: $(SNMP_AGENT)
-$(SNMP_AGENT): $(OBJDIR) $(SNMP_OBJDIR) $(AGENT_OBJDIR) $(AGENTGEN_OBJDIR) $(STUB_TEST_OBJDIR) $(ALL_OBJS) $(APP_DIR)/boottable/boottable.a \
+# Semi-colon is required at the end of the rules to make it empty to be build
+# and override any pre-defined rule known by make.
+# This is mainly required for the spc200 rules but in order to harmonize, it
+# is is preferable to do it for both rules (mse500 & spc200).
+# spc200 is also an object of dependency for the agent (spc200.c). Because of
+# the VPATH usage, make knows how to build "spc200" from "spc200.c". We need
+# to make it forget otherwise, it will try to build "spc200".
+mse500: $(SNMP_AGENT).mse500 ;
+
+spc200: $(SNMP_AGENT).spc200 ;
+
+$(SNMP_AGENT): $(SNMP_AGENT).mse500 $(SNMP_AGENT).spc200
+
+$(SNMP_AGENT).mse500: $(OBJDIR) $(SNMP_OBJDIR) $(AGENT_OBJDIR) $(AGENTGEN_OBJDIR) $(STUB_TEST_OBJDIR) $(ALL_OBJS) $(APP_DIR)/boottable/boottable.a.mse500 \
+ $(APP_DIR)/spidlib/spidlib.a $(APP_DIR)/mib/mib.a $(APP_DIR)/custom-mib/custom-mib.a $(APP_DIR)/smm/smm-client/smmlib.a
+ $(CC) -o $@ $(ALL_OBJS) $(APP_DIR)/mib/mib.a $(APP_DIR)/custom-mib/custom-mib.a $(APP_DIR)/smm/smm-client/smmlib.a $(LDFLAGS) -lpthread $(APP_DIR)/boottable/boottable.a.mse500 $(APP_DIR)/spidlib/spidlib.a
+
+$(SNMP_AGENT).spc200: $(OBJDIR) $(SNMP_OBJDIR) $(AGENT_OBJDIR) $(AGENTGEN_OBJDIR) $(STUB_TEST_OBJDIR) $(ALL_OBJS) $(APP_DIR)/boottable/boottable.a.spc200 \
$(APP_DIR)/spidlib/spidlib.a $(APP_DIR)/mib/mib.a $(APP_DIR)/custom-mib/custom-mib.a $(APP_DIR)/smm/smm-client/smmlib.a
- $(CC) -o $@ $(ALL_OBJS) $(APP_DIR)/mib/mib.a $(APP_DIR)/custom-mib/custom-mib.a $(APP_DIR)/smm/smm-client/smmlib.a $(LDFLAGS) -lpthread $(APP_DIR)/boottable/boottable.a $(APP_DIR)/spidlib/spidlib.a
+ $(CC) -o $@ $(ALL_OBJS) $(APP_DIR)/mib/mib.a $(APP_DIR)/custom-mib/custom-mib.a $(APP_DIR)/smm/smm-client/smmlib.a $(LDFLAGS) -lpthread $(APP_DIR)/boottable/boottable.a.spc200 $(APP_DIR)/spidlib/spidlib.a
$(OBJPARENT) :
mkdir $(OBJPARENT)