makefile.ux.nognu 2.3 KB
Newer Older
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
1 2 3
#############################################################################
# WARNING: this file is a meta-makefile written to adapt the compilation of
# nmxptool when you are compiling it under Earthworm system. This file should
Matteo Quintiliani's avatar
Matteo Quintiliani committed
4
# work for all operating systems using almost all 'make' programs.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
5
#
Matteo Quintiliani's avatar
Matteo Quintiliani committed
6 7 8 9
# It is based on program 'test' and environment variables:
#     $GLOBLAFLAGS, $EW_HOME, $EW_VERSION
# If you want to enable libmseed support for nmxptool you have to have 'gcc'
#     and set variable EXTRAPACKAGE to "with-libmseed".
Matteo Quintiliani's avatar
Matteo Quintiliani committed
10
#
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
11 12 13 14 15 16
# For Windows-XP and Windows-2000 compile under MinGW.
#
# make -f makefile.ux.nognu 
# make -f makefile.ux.nognu clean
# make -f makefile.ux.nognu clean_bin
#
Matteo Quintiliani's avatar
Matteo Quintiliani committed
17 18 19 20 21
# make -f makefile.ux.nognu reconfigure
#
# make -f makefile.ux.nognu install
# make -f makefile.ux.nognu distclean
#
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
22 23 24
# Author: Matteo Quintiliani - I.N.G.V. - quintiliani@ingv.it
#############################################################################

Matteo Quintiliani's avatar
Matteo Quintiliani committed
25 26 27
# If you do not use 'gcc' you can not compile 'libmseed'
EXTRAPACKAGE=--without-libmseed

28 29
CFLAGS += $(GLOBALFLAGS) -I$(EW_HOME)/$(EW_VERSION)/src/libsrc/util/libmseed
LDFLAGS += -L$(EW_HOME)/$(EW_VERSION)/src/libsrc/util/libmseed
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
30 31 32

LIBNMXPSRC=libnmxp

Matteo Quintiliani's avatar
Matteo Quintiliani committed
33
all: configurelib makelib configurenmxp makenmxp install
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
34

Matteo Quintiliani's avatar
Matteo Quintiliani committed
35
clean: cleanlib cleannmxp
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
36 37 38

# Clean nmxptool binary from Earthworm system
clean_bin:
Matteo Quintiliani's avatar
Matteo Quintiliani committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
	make uninstall-ew-bin

reconfigure: distclean configurelib cleanlib makelib configurenmxp cleannmxp makenmxp install
	
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #

install:
	make install-ew-bin

distclean: distcleanlib distcleannmxp

# # # # # # # # # # # # # # # # # # # # # # # # # # # # #

configurelib:
	( test -f $(LIBNMXPSRC)/Makefile && test -f $(LIBNMXPSRC)/src/Makefile ) \
		|| ( cd $(LIBNMXPSRC) && ./configure $(EXTRAPACKAGE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" )

configurenmxp:
	( test -f Makefile && test -f src/Makefile ) \
		|| ( ./configure $(EXTRAPACKAGE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" )

makelib:
	cd $(LIBNMXPSRC) && make

makenmxp:
	make

cleanlib:
	( test ! -f $(LIBNMXPSRC)/Makefile ) \
		|| ( cd $(LIBNMXPSRC) && make clean )

cleannmxp:
	( test ! -f Makefile ) \
		|| ( make clean )

distcleanlib:
	( test ! -f $(LIBNMXPSRC)/Makefile ) \
		|| (  cd $(LIBNMXPSRC) && make distclean )

distcleannmxp:
	( test ! -f Makefile ) \
		|| ( make distclean )
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
81