1XEN_ROOT = $(CURDIR)/../.. 2include $(XEN_ROOT)/tools/Rules.mk 3 4LIBMEMSHR-BUILD := libmemshr.a 5 6CFLAGS += -Werror 7CFLAGS += -Wno-unused 8CFLAGS += $(CFLAGS_xeninclude) 9CFLAGS += $(CFLAGS_libxenctrl) 10CFLAGS += -D_GNU_SOURCE 11CFLAGS += -fPIC 12 13LIB-SRCS := interface.c 14LIB-SRCS += shm.c 15LIB-SRCS += bidir-daemon.c 16LIB-SRCS += bidir-hash.c 17 18LIB-OBJS := interface.o 19LIB-OBJS += shm.o 20LIB-OBJS += bidir-daemon.o 21LIB-OBJS += bidir-hash-fgprtshr.o 22LIB-OBJS += bidir-hash-blockshr.o 23 24all: build 25 26build: $(LIBMEMSHR-BUILD) 27 28bidir-hash-fgprtshr.o: bidir-hash.c 29 $(CC) $(CFLAGS) -DFINGERPRINT_MAP -c -o $*.o bidir-hash.c 30 31bidir-hash-blockshr.o: bidir-hash.c 32 $(CC) $(CFLAGS) -DBLOCK_MAP -c -o $*.o bidir-hash.c 33 34libmemshr.a: $(LIB-OBJS) 35 $(AR) rc $@ $^ 36 37install: all 38 39uninstall: 40 41clean: 42 rm -rf *.a *.o *~ $(DEPS_RM) 43 44.PHONY: distclean 45distclean: clean 46 47.PHONY: all build clean install distclean uninstall 48 49-include $(DEPS_INCLUDE) 50