Skip to content

Commit

Permalink
Lots of bug fixes from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete Wyckoff committed Feb 19, 2008
1 parent c78f6e8 commit 0ec43ba
Show file tree
Hide file tree
Showing 116 changed files with 2,784 additions and 1,611 deletions.
79 changes: 45 additions & 34 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -300,32 +300,24 @@ endif
# enable GM if configure detected it

ifdef BUILD_GM
CFLAGS += -I @GM_HOME@/include -I @GM_HOME@/include/gm
CFLAGS += -D__STATIC_METHOD_BMI_GM__
# TODO: later on we will want the ability to modify this at configure
# time
CFLAGS += -DENABLE_GM_BUFPOOL
LDFLAGS += -L@GM_HOME@/lib
SERVER_LDFLAGS += -L@GM_HOME@/lib
LIBS += -lgm
LIBS_THREADED += -lgm
SERVERLIBS += -lgm
# other settings in bmi_gm/module.mk.in
CFLAGS += -D__STATIC_METHOD_BMI_GM__
GMLIBS := -L@GM_LIBDIR@ -lgm
LIBS += $(GMLIBS)
LIBS_THREADED += $(GMLIBS)
SERVERLIBS += $(GMLIBS)
endif

################################################################
# enable MX if configure detected it

ifdef BUILD_MX
CFLAGS += -I @MX_HOME@/include
CFLAGS += -D__STATIC_METHOD_BMI_MX__
# TODO: later on we will want the ability to modify this at configure
# time
CFLAGS += -g -O0
LDFLAGS += -L@MX_HOME@/lib
SERVER_LDFLAGS += -L@MX_HOME@/lib
LIBS += -lmyriexpress -lpthread
LIBS_THREADED += -lmyriexpress -lpthread
SERVERLIBS += -lmyriexpress -lpthread
# other settings in bmi_mx/module.mk.in
CFLAGS += -D__STATIC_METHOD_BMI_MX__
MXLIBS := -L@MX_LIBDIR@ -lmyriexpress -lpthread
LIBS += $(MXLIBS)
LIBS_THREADED += $(MXLIBS)
SERVERLIBS += $(MXLIBS)
endif

#####################################
Expand Down Expand Up @@ -402,6 +394,8 @@ ADMINSRC_SERVER :=
LIBSRC :=
# SERVERSRC is souce code for the pvfs2 server
SERVERSRC :=
# SERVERBINSRC is source files that don't get added to the server library but must be added to the server binary
SERVERBINSRC :=
# DOCSRC is source code for documentation
DOCSRC :=
# VISSRC is the source code for visualization tools
Expand All @@ -413,8 +407,7 @@ VISMISCSRC :=
KARMASRC :=
# userland helper programs for kernel drivers
KERNAPPSRC :=
#
KERNAPPSTHRSRC :=
KERNAPPTHRSRC :=
# MISCSRC are sources that don't fall into the other categories
MISCSRC :=
# c files generated from state machines
Expand All @@ -432,18 +425,18 @@ SERVER_STUB := src/server/pvfs2-server-stub
SERVER := src/server/pvfs2-server
endif

# LIBRARIES is a list of the pvfs2 client libraries
# LIBRARIES is a list of the pvfs2 client libraries that will be installed
LIBRARIES :=
LIBRARIES_THREADED :=
ifeq ($(build_shared),yes)
LIBRARIES_SHARED = lib/libpvfs2.so
LIBRARIES += $(LIBRARIES_SHARED)
LIBRARIES_THREADED += lib/libpvfs2-threaded.so
endif
ifeq ($(build_static),yes)
LIBRARIES_STATIC = lib/libpvfs2.a
LIBRARIES += $(LIBRARIES_STATIC)
LIBRARIES_THREADED_STATIC = lib/libpvfs2-threaded.a
LIBRARIES_THREADED += $(LIBRARIES_THREADED_STATIC)
LIBRARIES_THREADED += lib/libpvfs2-threaded.a
endif

################################################################
Expand Down Expand Up @@ -494,6 +487,9 @@ ifdef BUILD_SERVER
SERVEROBJS := $(patsubst %.c,%-server.o, $(filter %.c,$(SERVERSRC)))
# SERVERDEPENDS is a list of dependency files for the server
SERVERDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(SERVERSRC)))
# SERVERBINOBJS is a list of objects not in SERVEROBJS to put into the server
SERVERBINOBJS := $(patsubst %.c,%-server.o, $(filter %.c,$(SERVERBINSRC)))
SERVERBINDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(SERVERBINSRC)))
endif

# MISCOBJS is a list of misc. objects not in the above categories
Expand All @@ -502,14 +498,21 @@ MISCOBJS := $(patsubst %.c,%.o, $(filter %.c,$(MISCSRC)))
MISCDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(MISCSRC)))

# KERNAPPOBJS is a list of kernel driver userland objects
KERNAPPOBJS := $(patsubst %.c,%.o, $(filter %.c,$(KERNAPPSRC)))
KERNAPPOBJS := $(patsubst %.c,%.o, $(filter %.c,$(KERNAPPSRC))) \
$(patsubst %.c,%-threaded.o, $(filter %.c,$(KERNAPPTHRSRC)))
# KERNAPPS is a list of kernel driver userland executables
KERNAPPS := $(patsubst %.c,%, $(filter %.c, $(KERNAPPSRC)))
KERNAPPSTHR := $(patsubst %.c,%, $(filter %.c, $(KERNAPPTHRSRC)))
# KERNAPPDEPENDS is a list of dependency files for kernel driver userland
# objects
KERNAPPDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(KERNAPPSRC)))

KERNAPPSTHR := $(patsubst %.c,%-threaded, $(filter %.c, $(KERNAPPSTHRSRC)))
KERNAPPDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(KERNAPPSRC) $(KERNAPPTHRSRC)))
# Be sure to build/install the threaded lib too; just pick the shared
# one if configure asked for both.
ifneq (,$(KERNAPPSTHR))
ifeq (,$(filter $(firstword $(LIBRARIES_THREADED)),$(LIBRARIES)))
LIBRARIES += $(firstword $(LIBRARIES_THREADED))
endif
endif

# VISOBJS is a list of visualization program objects
VISOBJS := $(patsubst %.c,%.o, $(filter %.c,$(VISSRC)))
Expand Down Expand Up @@ -546,7 +549,8 @@ DOCSCRUFT += $(patsubst %.tex,%.toc, $(filter %.tex,$(DOCSRC)))
# DEPENDS is a global list of all of our dependency files.
# NOTE: sort is just a trick to remove duplicates; the order
# doesn't matter at all.
DEPENDS := $(sort $(LIBDEPENDS) $(SERVERDEPENDS) $(MISCDEPENDS) \
DEPENDS := $(sort $(LIBDEPENDS) $(SERVERDEPENDS) $(SERVERBINDEPENDS) \
$(MISCDEPENDS) \
$(ADMINDEPENDS) $(ADMINDEPENDS_SERVER) $(KERNAPPDEPENDS) $(VISDEPENDS) \
$(VISMISCDEPENDS) $(KARMADEPENDS) $(STATECOMPDEPS))

Expand All @@ -562,6 +566,9 @@ admintools: $(ADMINTOOLS) $(ADMINTOOLS_SERVER)
# target for building kernel driver userland programs
kernapps: $(KERNAPPS)

# this is needed for the make dist
statecompgen: $(STATECOMPGEN)

# Build linux-2.6 kernel module if requested.
# Can't use the actual file target since we don't know how to figure out
# dependencies---only the kernel source tree can do that.
Expand Down Expand Up @@ -610,7 +617,7 @@ SERVERLIBS += -Wl,-whole-archive ../stgt/libstgt.a -Wl,-no-whole-archive \
endif

# rule for building the pvfs2 server
$(SERVER): src/server/pvfs2-server-server.o lib/libpvfs2-server.a
$(SERVER): $(SERVERBINOBJS) lib/libpvfs2-server.a
$(Q) " LD $@"
$(E)$(LD) $^ -o $@ $(SERVER_LDFLAGS) $(SERVERLIBS)

Expand Down Expand Up @@ -724,8 +731,11 @@ $(VISS): %: %.o $(VISMISCOBJS) $(LIBRARIES)
# all applications depend on the pvfs2 library
$(ADMINTOOLS): %: %.o $(LIBRARIES)
$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a

$(KERNAPPS): %: %.o $(LIBRARIES)
$(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED)
$(Q) " LD $@"
$(E)$(LD) -o $@ $(LDFLAGS) $< $(LIBS_THREADED) $(call modldflags,$<)

# special rules to build state machine compiler using build host compiler
$(STATECOMPOBJS): %.o: %.c
Expand Down Expand Up @@ -776,7 +786,8 @@ docsclean:
# top rule for cleaning up tree
clean::
$(Q) " CLEAN"
$(E)rm -f $(LIBOBJS) $(LIBTHREADEDOBJS) $(SERVEROBJS) $(MISCOBJS) \
$(E)rm -f $(LIBOBJS) $(LIBTHREADEDOBJS) \
$(SERVEROBJS) $(SERVERBINOBJS) $(MISCOBJS) \
$(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \
$(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\
$(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\
Expand Down Expand Up @@ -952,7 +963,7 @@ just_kmod_install: just_kmod
.PHONY: kmod_install
kmod_install: kmod kernapps just_kmod_install
install -d $(prefix)/sbin
install -m 755 $(KERNAPPS) $(prefix)/sbin
install -m 755 $(KERNAPPS) $(KERNAPPSTHR) $(prefix)/sbin
endif

ifneq (,$(LINUX24_KERNEL_SRC))
Expand All @@ -973,7 +984,7 @@ just_kmod24_install: just_kmod24
.PHONY: kmod24_install
kmod24_install: kmod24 kernapps just_kmod24_install
install -d $(prefix)/sbin
install -m 755 $(KERNAPPS) $(prefix)/sbin
install -m 755 $(KERNAPPS) $(KERNAPPSTHR) $(prefix)/sbin
install -m 755 src/apps/kernel/linux/mount.pvfs2 $(prefix)/sbin
@echo ""
@echo "For improved linux-2.4 support,"
Expand Down
Loading

0 comments on commit 0ec43ba

Please sign in to comment.