Hariharasubramanian R | 4447309 | 2015-10-15 08:25:28 -0500 | [diff] [blame] | 1 | CXX ?= $(CROSS_COMPILE)g++ |
| 2 | |
| 3 | IPMI_FRU_PARSER_LIB = libifp.so |
| 4 | IPMI_FRU_PARSER_OBJS = frup.o |
| 5 | |
| 6 | INC_FLAGS += $(shell pkg-config --cflags --libs libsystemd) -I. -O2 --std=gnu++11 |
| 7 | LIB_FLAGS += $(shell pkg-config --libs libsystemd) -rdynamic |
| 8 | #IPMID_PATH ?= -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" |
| 9 | |
| 10 | all: $(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 | |
| 18 | clean: |
| 19 | rm -f $(IPMI_FRU_PARSER_OBJS) $(IPMI_FRU_PARSER_LIB) |