#==================================================================== # NeXus - Neutron & X-ray Common Data Format # # Makefile for compiling NeXus with MinGW gcc/g77 distribution # (see http://www.mingw.org/ for compiler details) # # run this file with: mingw32-make -f makefile.mingw # # Copyright (C) 2002 Freddie Akeroyd, CCLRC Rutherford Appleton Laboratory # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # For further information, see # # $Id$ # #==================================================================== # # set these values for your HDF distribution # HDF4ROOT=c:\program files\hdf41r5 HDFLIBS=-lhm415m -lhd415m # # these should not need to be changed # LIBNEXUS_OBJ=napi.o napif.o TEST4_OBJ=napi4_test.o NXBROWSE_OBJ=NXbrowse.o NXTOXML_OBJ=NXtoXML.o NXTODTD_OBJ=NXtoDTD.o CC=gcc FC=g77 EXTRA_LIBS=-lwsock32 -lg2c # all: nexusdll.lib napif_test napi4_test NXbrowse NXtoXML NXtoDTD napi.o : napi.c $(CC) -c -DHDF4 -D__unix -D_WIN32 -D_DLL -DNX45DLL_EXPORTS -I"$(HDF4ROOT)\include" $< .c.o : $(CC) -c -DHDF4 -D__unix -D_WIN32 -D_DLL -I"$(HDF4ROOT)\include" $< .f.o : g77 -c $< # # nexusdll.lib is the DLL import library to link your program against. # At run time, your program will then need access to nexus.dll # nexusdll.lib : $(LIBNEXUS_OBJ) - rm -f $@ dllwrap --output-lib=$@ --export-all-symbols --dllname=nexus.dll --driver-name=gcc \ $(LIBNEXUS_OBJ) -L"$(HDF4ROOT)\dlllib" $(HDFLIBS) $(EXTRA_LIBS) napi4_test : nexusdll.lib $(TEST4_OBJ) $(CC) $(CFLAGS) -o napi4_test $(TEST4_OBJ) nexusdll.lib \ -L"$(HDF4ROOT)\dlllib" $(HDFLIBS) $(EXTRA_LIBS) napif_test: nexusdll.lib napif_test.o $(FC) $(FFLAGS) -o napif_test napif_test.o nexusdll.lib \ -L"$(HDF4ROOT)\dlllib" -lfrtbegin $(HDFLIBS) $(EXTRA_LIBS) NXbrowse: nexusdll.lib $(NXBROWSE_OBJ) $(CC) $(CFLAGS) -o NXbrowse $(NXBROWSE_OBJ) nexusdll.lib \ -L"$(HDF4ROOT)\dlllib" $(HDFLIBS) $(EXTRA_LIBS) NXtoXML: nexusdll.lib $(NXTOXML_OBJ) $(CC) $(CFLAGS) -o NXtoXML $(NXTOXML_OBJ) nexusdll.lib \ -L"$(HDF4ROOT)\dlllib" $(HDFLIBS) $(EXTRA_LIBS) NXtoDTD: nexusdll.lib $(NXTODTD_OBJ) $(CC) $(CFLAGS) -o NXtoDTD $(NXTODTD_OBJ) nexusdll.lib \ -L"$(HDF4ROOT)\dlllib" $(HDFLIBS) $(EXTRA_LIBS)