diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-08-01 11:19:06 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-08-01 11:19:06 +0200 |
commit | c23016096ab5f8bae409006306e6652e04da030a (patch) | |
tree | 255c96d4ea8bd891508720bd98b3b40a4b787459 /util/Makefile.am | |
parent | c7d4db3862a24474655a43c98572e82503d9fa6b (diff) | |
parent | f3bbd65d98b943e7224be2c1ff242fcf04386701 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'util/Makefile.am')
-rw-r--r-- | util/Makefile.am | 111 |
1 files changed, 69 insertions, 42 deletions
diff --git a/util/Makefile.am b/util/Makefile.am index f8f0bab..e37e0ef 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,11 +1,11 @@ localedir = $(datadir)/locale -INCLUDES = -I.. OS_CF = @OS_CFLAGS@ @CROSS_CFLAGS@ OS_LF = @OS_LFLAGS@ @CROSS_LFLAGS@ -AM_CPPFLAGS = $(OS_CF) -DLOCALEDIR=\"$(localedir)\" +AM_CPPFLAGS = $(OS_CF) -DLOCALEDIR=\"$(localedir)\" -I.. AM_CPPFLAGS += @IA64_CFLAGS@ @GPL_CFLAGS@ LDADD = $(OS_LF) +# usu LD_SAMX = ../lib/libipmi_lanplus.a -lcrypto LDSAM = $(OS_LF) @LD_SAMX@ CFLAGS_SAMX = -O2 -g -I. -I.. $(OS_CF) @LANPLUS_CFLAGS@ CFLAGS_SAM = -O2 -g -I. -I.. $(OS_CF) @@ -22,10 +22,15 @@ CMDMOD += md5.c md2.c ipmilan.c CMDMOD += ipmilanplus.c # CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@ # am: configure substitutions are not allowed in _SOURCES variables -LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@ +TMPOBJL = $(tmpobj)/ipmilanL.o $(tmpobj)/ipmilanplusL.o +TMPOBJA = $(tmpobj)/ipmilanA.o $(tmpobj)/ipmilanplusA.o +LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o @LIBSENSORS@ OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c oem_asus.c iekanalyzer.c +# usu SAM2OBJ = isensor2.o ievents2.o L2OBJ = @SAM2OBJ@ +# To build ipmiutil, need to use METACFLAGS for each .c/.o + AM_CPPFLAGS += -I. -I.. -DMETACOMMAND METASOURCE = ipmiutil.c ialarms.c ihealth.c ievents.c ifru.c ifru_picmg.c igetevent.c ireset.c icmd.c ilan.c isensor.c isel.c iserial.c iwdt.c isol.c idiscover.c iconfig.c ipicmg.c ifirewall.c ifwum.c ihpm.c itsol.c idcmi.c iuser.c $(OEMMOD) $(CMDMOD) LDADD += -lpthread @@ -77,60 +82,55 @@ libimbapi.a: imbapi.c $(RANLIB) libimbapi.a rm -f $(tmpobj)/imbapi.o +$(tmpobj)/ipmilanplusL.o: ipmilanplus.c + mkdir -p $(tmpobj) + $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplusL.o -c ipmilanplus.c; + +$(tmpobj)/ipmilanL.o: ipmilan.c + mkdir -p $(tmpobj) + $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanL.o -c ipmilan.c; + +$(tmpobj)/ipmilanplusA.o: ipmilanplus.c + mkdir -p $(tmpobj) + $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanplusA.o -c ipmilanplus.c; + +$(tmpobj)/ipmilanA.o: ipmilan.c + mkdir -p $(tmpobj) + $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanA.o -c ipmilan.c; + # Build a lib to support all of the IPMI drivers (libipmiutil.a) # If LANPLUS_SAM = yes, include LANPLUS_OBJ, else do not. # See configure --enable-liblanplus to change this -$(DEV_LIB): $(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@ - mkdir -p $(tmpobj) +$(DEV_LIB): $(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@ $(TMPOBJL) $(TMPOBJA) if [ "x@LANPLUS_SAM@" = "xyes" ]; then \ - $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ - $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \ ar x @LANPLUS_LIB@ ; \ - $(AR) cru $(DEV_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \ + $(AR) cru $(DEV_LIB) $(LIBOBJ) $(TMPOBJL) $(LANPLUS_OBJ); \ $(RANLIB) $(DEV_LIB); \ else \ - $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ - $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \ - $(AR) cru $(DEV_LIB) $(LIBOBJ) ; \ + $(AR) cru $(DEV_LIB) $(LIBOBJ) $(TMPOBJA) ; \ $(RANLIB) $(DEV_LIB) ; \ fi -$(SHR_LIB): $(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@ - mkdir -p $(tmpobj) +$(SHR_LIB): $(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@ $(TMPOBJL) $(TMPOBJA) if [ "x@LANPLUS_SAM@" = "xyes" ]; then \ - $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ - $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \ ar x @LANPLUS_LIB@ ; \ - $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \ + $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) $(TMPOBJL) $(LANPLUS_OBJ); \ else \ - $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ - $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \ - $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) ; \ + $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) $(TMPOBJA) ; \ fi $(SHR_BLIB): $(SHR_LIB) ln -s $(SHR_LIB) $(SHR_BLIB) -# To build ipmiutil, need to use METACFLAGS for each .c/.o - idiscover$(EXEEXT): idiscover.c $(CC) $(CFLAGS_SAM) $(LDFLAGS) $(OS_LF) -o idiscover idiscover.c -ipmimv: ipmimv.c +ipmimv$(EXEEXT): ipmimv.c $(CC) $(CFLAGS_SAM) $(LDFLAGS) -DTEST_BIN -o ipmimv ipmimv.c ievents$(EXEEXT): ievents.c $(CC) $(CFLAGS_SAM) $(LDFLAGS) -DALONE -o ievents ievents.c -ipmi_sample: $(DEV_LIB) ipmi_sample.c isensor.c ievents.c - $(CC) $(CFLAGS_SAM) -c ipmi_sample.c - $(CC) -g -O2 -o ipmi_sample ipmi_sample.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) - -ialarms_enc: $(DEV_LIB) ialarms.c oem_intel.c - $(CC) $(CFLAGS_SAM) -DTEST_ENC -o ialarms2.o -c ialarms.c - $(CC) $(CFLAGS_SAM) -DNO_EVENTS -o oem_intel2.o -c oem_intel.c - $(CC) -g -O2 -o ialarms_enc ialarms2.o oem_intel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) - isensor2.o: isensor.c $(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c @@ -140,32 +140,59 @@ ievents2.o: ievents.c ifru_picmg2.o: ifru_picmg.c $(CC) $(CFLAGS_SAM) -o ifru_picmg2.o -c ifru_picmg.c -# To build ipmi_sample with GET_SENSORS enabled, need isensors.o, ievents.o -# Note that this does not include oem_intel, etc. for OEM SEL decoding. -ipmi_sample2: $(DEV_LIB) ipmi_sample.c ifru.c isel.c ifru_picmg2.o $(L2OBJ) - $(CC) $(CFLAGS_SAM) -D GET_SENSORS -D GET_FRU -o ipmi_sample2.o -c ipmi_sample.c +ifru2.o: ifru.c $(CC) $(CFLAGS_SAM) -o ifru2.o -c ifru.c + +isel2.o: isel.c $(CC) $(CFLAGS_SAM) -o isel2.o -c isel.c - $(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o $(L2OBJ) ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) -ipmi_sample_evt: $(DEV_LIB) ipmi_sample_evt.c $(L2OBJ) +ipmi_sample.o: ipmi_sample.c + $(CC) $(CFLAGS_SAM) -c ipmi_sample.c + +ipmi_sample2.o: ipmi_sample.c + $(CC) $(CFLAGS_SAM) -D GET_SENSORS -D GET_FRU -o ipmi_sample2.o -c ipmi_sample.c + +ipmi_sample_evt.o: ipmi_sample_evt.c $(CC) $(CFLAGS_SAM) -o ipmi_sample_evt.o -c ipmi_sample_evt.c + +ipmi_sample$(EXEEXT): $(DEV_LIB) ipmi_sample.o isensor.o ievents.o + $(CC) -g -O2 -o ipmi_sample ipmi_sample.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) + +# To build ipmi_sample with GET_SENSORS enabled, need isensors.o, ievents.o +# Note that this does not include oem_intel, etc. for OEM SEL decoding. +ipmi_sample2$(EXEEXT): $(DEV_LIB) ipmi_sample2.o ifru2.o isel2.o ifru_picmg2.o $(L2OBJ) + $(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o $(L2OBJ) ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) + +ipmi_sample_evt$(EXEEXT): $(DEV_LIB) ipmi_sample_evt.o $(L2OBJ) $(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o $(L2OBJ) $(DEV_LIB) $(LDFLAGS) $(LDSAM) -ifruset: $(DEV_LIB) ifruset.c ifru_picmg2.o +ialarms2.o: ialarms.c + $(CC) $(CFLAGS_SAM) -DTEST_ENC -o ialarms2.o -c ialarms.c + +oem_intel2.o: oem_intel.c + $(CC) $(CFLAGS_SAM) -DNO_EVENTS -o oem_intel2.o -c oem_intel.c + +ialarms_enc$(EXEEXT): $(DEV_LIB) ialarms2.o oem_intel2.o + $(CC) -g -O2 -o ialarms_enc ialarms2.o oem_intel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) + +ifruset.o: ifruset.c $(CC) $(CFLAGS_SAM) -c ifruset.c + +ifruset$(EXEEXT): $(DEV_LIB) ifruset.o ifru_picmg2.o $(CC) -g -O2 -o ifruset ifruset.o ifru_picmg2.o $(DEV_LIB) $(LDFLAGS) $(LDADD) -iseltime: $(DEV_LIB) iseltime.c +iseltime.o: iseltime.c $(CC) $(CFLAGS_SAM) -c iseltime.c + +iseltime$(EXEEXT): $(DEV_LIB) iseltime.o $(CC) -g -O2 -o iseltime iseltime.o $(DEV_LIB) $(LDFLAGS) $(LDADD) +iconfig$(EXEEXT): iconfig.c $(DEV_LIB) + $(CC) $(CFLAGS_SAM) $(LDFLAGS) -o iconfig iconfig.c $(DEV_LIB) @LANPLUS_CRYPTO@ + ipmi_port$(EXEEXT): ipmi_port.c $(CC) $(CFLAGS_SAM) $(LDFLAGS) -o ipmi_port ipmi_port.c -iconfig: iconfig.c $(DEV_LIB) - $(CC) $(CFLAGS_SAM) $(LDFLAGS) -o iconfig iconfig.c $(DEV_LIB) @LANPLUS_CRYPTO@ - # @LANPLUS_LIB@ is ../lib/libipmi_lanplus.a ../lib/libipmi_lanplus.a: cd ../lib; make |