# # Warning: This makefile assumes that you are using Gnu Make. # # Change the value of the MX_ARCH variable below to match the platform you # are compiling the MX MarCCD interface for. The available platforms are: # # linux - Compile for Linux # macosx - Compile for MacOS X # solaris - Compile for Solaris with the Sunstudio compiler # solaris-gcc - Compile for Solaris with GCC # win32 - Compile for Win32 using Visual C++ # # To build the MX MarCCD interface, you must first build the MX library # itself. Next, set the variables MX_ARCH and LIBMX below. Then do a # "make depend" and finally a "make". # MX_ARCH = linux MX_INSTALL_DIR = /opt/mx ##EXTRA_LIBRARIES = -L/opt/epics/base/lib/darwin-x86 -lca -lCom #----------------------------------------------------------------------- # # Note that libMx.a is statically linked for most platforms since that # allows goniostat to start faster. Look at the README file for why # that may be important. # ifeq ($(MX_ARCH),linux) LIBMX = $(LIBMX_DIR)/libMx.a -lpthread -lrt -ldl -lm endif ifeq ($(MX_ARCH),macosx) LIBMX = $(LIBMX_DIR)/libMx.a endif ifeq ($(MX_ARCH),solaris) LIBMX = $(LIBMX_DIR)/libMx.a -lm -lnsl -lsocket -lposix4 -lmalloc endif ifeq ($(MX_ARCH),solaris-gcc) LIBMX = $(LIBMX_DIR)/libMx.a -lm -lnsl -lsocket -lposix4 -lmalloc endif LIBMX_DIR = ../mx/libMx LIBMX_INC = -I$(LIBMX_DIR) LIBMX_SHARED = -L$(LIBMX_DIR) -lMx MAKEHEAD = $(LIBMX_DIR)/Makehead.$(MX_ARCH) all: build include $(MAKEHEAD) GONIOSTAT_NAME = goniostat$(DOTEXE) build: $(GONIOSTAT_NAME) clean: -$(RM) *.$(OBJ) *.ilk *.pdb -$(RM) $(GONIOSTAT_NAME) distclean: clean depend: install: goniostat cp goniostat $(MX_INSTALL_DIR)/bin goniostat.$(OBJ): goniostat.c $(CC) $(CFLAGS) $(LIBMX_INC) -c goniostat.c # # This version is for Win32. ifeq ($(MX_ARCH),win32) goniostat.exe: goniostat.obj link /debug /nologo /out:$(GONIOSTAT_NAME) /nodefaultlib:libc \ goniostat.obj ..\\\\mx\\\\libMx\\\\libMx.lib $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the executable. if test -f $(GONIOSTAT_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo \ -outputresource:$(GONIOSTAT_NAME)\;1 \ -manifest $(GONIOSTAT_NAME).manifest \ $(EXTRA_MANIFESTS) ; \ rm -f $(GONIOSTAT_NAME).manifest; \ fi # This version is for everyone else. else goniostat: goniostat.o $(CC) -g -o goniostat goniostat.o $(LIBMX) $(EXTRA_LIBRARIES) endif