blob: cf75af3f675e276c88c2dc316bd3ca8f0984e874 [file] [log] [blame]
Hariharasubramanian R44473092015-10-15 08:25:28 -05001CXX ?= $(CROSS_COMPILE)g++
2
3IPMI_FRU_PARSER_LIB = libifp.so
4IPMI_FRU_PARSER_OBJS = frup.o
5
6INC_FLAGS += $(shell pkg-config --cflags --libs libsystemd) -I. -O2 --std=gnu++11
7LIB_FLAGS += $(shell pkg-config --libs libsystemd) -rdynamic
8#IPMID_PATH ?= -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\"
9
10all: $(IPMI_FRU_PARSER_LIB)
11
12%.o: %.c
13 $(CXX) -fpic -c $< $(CXXFLAGS) $(INC_FLAG) $(IPMID_PATH) -o $@
14
15$(IPMI_FRU_PARSER_LIB): $(IPMI_FRU_PARSER_OBJS)
16 $(CXX) $^ -shared $(LDFLAGS) $(LIB_FLAGS) -o $@
17
18clean:
19 rm -f $(IPMI_FRU_PARSER_OBJS) $(IPMI_FRU_PARSER_LIB)