# GNU Makefile to build the ImportHDF5 and ImportAHFinderHDF5 modules # provided in this directory as OpenDX loadable modules # # check that the environment points to the OpenDX and HDF5 installations ifeq ($(DXROOT),) $(error "You must set DXROOT to point to your OpenDX installation !") endif # find out the architecture by looking for a $(DXROOT)/lib_$(DXARCH) directory ifeq ($(DXARCH),) DXARCH := $(shell ls $(DXROOT) | grep lib_ | cut -c5-) endif # include the DXARCH makefile include $(DXROOT)/lib_linux/arch.mak # now set the makefile variables for compiling and linking build_loadable_modules = 'yes' CFLAGS += $(DX_RTL_CFLAGS) $(DXABI) -I$(DXROOT)/include CC = $(DXCC) LD = $(SHARED_LINK) # the DX_RTL_LDFLAGS for Darwin are broken; # hardcode them here in the hope they are working ifeq ($(build_loadable_modules), 'yes') ifeq ($(DXARCH), macos) LDLIBS += -bundle -flat_namespace -bundle_loader $(DXROOT)/bin_$(DXARCH)/dxexec -Wl,-iDXEntry:_DXEntry -e DXEntry else LDLIBS += $(DX_RTL_LDFLAGS) $(DXABI) endif else LDLIBS += -L$(DXROOT)/lib_$(DXARCH) -lDX $(DX_X_LINK_LIBS) endif # the object files to build OBJS = ConvergenceFactor.o ConvergenceFactor-modulebinding.o # the build rules ConvergenceFactor: $(OBJS) ConvergenceFactor-modulebinding.c: ConvergenceFactor.mdf ifeq ($(build_loadable_modules), 'yes') $(DXROOT)/bin/mdf2c -m $^ > $@ else $(DXROOT)/bin/mdf2c $^ > $@ endif .PHONY: clean clean: rm -f $(OBJS) ConvergenceFactor-modulebinding.c ConvergenceFactor