home *** CD-ROM | disk | FTP | other *** search
Makefile | 1997-07-08 | 5.3 KB | 177 lines |
- # $Id: Makefile,v 1.9 1997/01/29 23:25:26 kirk Exp $
- #
- #
- # Copyright (c) 1988-1997, Research Systems Inc. All rights reserved.
- # This software includes information which is proprietary to and a
- # trade secret of Research Systems, Inc. It is not to be disclosed
- # to anyone outside of this organization. Reproduction by any means
- # whatsoever is prohibited without express written permission.
- #
- #
- # makefile for new rpc routines.
- #
- # Purpose:
- # This makefile is used to build the routines that make up
- # the IDL rpc system.
- #
- # Edits:
- # The following macro might need to be edited if the location
- # of IDL is not the standard location on your system.
-
- IDL_DIR = /usr/local/rsi/idl
-
- # Define macros used in the makefile.
-
- SERVER_OBJS = rpc_srvr.o rpc_tout.o
- CLIENT_OBJ = rpc_clnt.o
-
-
- # The following macros are defined when this file recurses and should
- # not be edited since they are overridden at run time.
-
- LD_SYS_PRE =
- LD_SYS_POST =
- FLAGS =
- C_FLAGS = -c $(FLAGS)
- LD = ld
- CC = cc
- SHELL = /bin/sh
-
- # The following macro is used to define sub-directory of the IDL_DIR/bin
- # directory for the system the file run on.
-
- BIN_DIR =
-
- # Some systems (sun os) use flags to specify dynamic libs and static ones
- # during link time.
-
- BDYNAMIC =
- BSTATIC =
- SO_VERSION =
- SHL_EXTENSION =so
- SHL_LD_FLAGS =
-
- TEST_POST =
-
- LD_LIBRARY_PATH = .
-
- # build the loader flags that are required to build the idlrpc executable.
- # If this is a sun system you will need to have motif installed!
-
- LD_FLAGS = $(LD_SYS_PRE) -L$(IDL_DIR)/bin/$(BIN_DIR) -lidl \
- $(LD_SYS_POST) $(BSTATIC) -lXm -lXt -lXext -lX11 $(BDYNAMIC) -ltermcap -lm
-
- # The following is the default entry point. This section will determine
- # what system we are on and call make again with the correct flags set.
-
- all :
- @echo "OS type detected: "`uname`
- @case `uname` in \
- "SunOS") if [ -d /proc -a `mach` = i386 ]; then \
- make rpclib "FLAGS=-DSOLARIS -Xa -xlibmieee" \
- "LD_SYS_PRE=-L/usr/openwin/lib -L/usr/dt/lib -R.:/usr/dt/lib" \
- "LD_SYS_POST= -lnsl -lintl -lgen -lsunmath" \
- "SHL_CFLAGS=-K pic" \
- "SHL_LD_FLAGS=-Bsymbolic -z nodefs -R . -G" \
- "TEST_LD_FLAGS= -z defs -i -R . -L." \
- "TEST_POST=-lnsl" \
- "BIN_DIR=bin.solaris2.x86"; \
- elif [ -d /proc ]; then \
- make rpclib "FLAGS= -DSOLARIS" \
- "LD_SYS_PRE=-L/usr/openwin/lib -L/usr/dt/lib -R.:/usr/dt/lib" \
- "LD_SYS_POST= -lnsl -lsunmath" \
- "SHL_CFLAGS=-K pic" \
- "SHL_LD_FLAGS=-Bsymbolic -z nodefs -R . -G" \
- "TEST_LD_FLAGS= -z defs -i -R . -L." \
- "TEST_POST=-lnsl" \
- "BIN_DIR=bin.solaris2.sparc"; \
- else \
- make rpclib "CC=acc" \
- "LD_SYS_PRE=$(IDL_DIR)/bin/bin.sunos.4.1/idl.o -L/usr/local/IXImd12x/lib" \
- "BDYNAMIC=-Bdynamic" \
- "BSTATIC=-Bstatic" \
- "SHL_CFLAGS= -PIC" \
- "LD_SYS_POST=-lMesaaux -lMesatk -lMesaGLU -lMesaGL" \
- "SHL_LD_FLAGS= -assert pure-text" \
- "TEST_LD_FLAGS=-L. -Bdynamic" \
- "SO_VERSION=.5.0" \
- "BIN_DIR=bin.sunos.4.1"; \
- fi \
- ;; \
- "AIX") make rpclib \
- "LD=cc" \
- "SHL_EXTENSION=a" \
- "SHL_LD_FLAGS= -bM:SRE -bE:idl_rpc.export -bnoentry" \
- "TEST_LD_FLAGS=-L." \
- "BIN_DIR=bin.ibm" ;; \
- "HP-UX") make rpclib \
- "FLAGS=-Aa -D_HPUX_SOURCE" \
- "LD_SYS_PRE= -Wl,+b,. -Wl,+s -Wl,-E -L. -L/usr/lib/X11R5 -L/usr/lib/Motif1.2" \
- "LD_SYS_POST= -lidl_cdf -lidl_netcdf -lidl_hdf -lMesaaux -lMesatk -lMesaGLU -lMesaGL -lcurses -lM -lcl -ldld" \
- "BIN_DIR=bin.hp" \
- "SHL_CFLAGS=+z" \
- "SHL_LD_FLAGS= -b -Brestricted +b . +s" \
- "SHL_EXTENSION= sl" \
- "TEST_LD_FLAGS= -Wl,+b,. -Wl,+s -L.";; \
- "IRIX" ) make rpclib "BIN_DIR=bin.sgi" \
- "SHL_CFLAGS=-KPIC" \
- "SHL_LD_FLAGS=-Bsymbolic -shared" \
- "TEST_LD_FLAGS=-L. -rpath ." \
- "LD_SYS_POST= /usr/lib/fixade.o -lidl_gmalloc -lfpe";; \
- "OSF1" ) make rpclib "BIN_DIR=bin.alpha" \
- "SHL_LD_FLAGS=-expect_unresolved '*' -shared" \
- "TEST_LD_FLAGS=-L. -Wl,-rpath,." \
- "FLAGS= -float";; \
- "Linux" ) make rpclib \
- "LD_SYS_PRE=$(IDL_DIR)/bin/bin.linux/idl.o -L/usr/X11R6/lib" \
- "SHL_CFLAGS= -fPIC" \
- "LD_SYS_POST=-Wl,-rpath,. -lidl_cdf -lidl_netcdf -lidl_hdf -lMesaaux -lMesatk -lMesaGLU -lMesaGL" \
- "SHL_LD_FLAGS= -shared" \
- "TEST_LD_FLAGS=-L. -Wl,-rpath,." \
- "BIN_DIR=bin.linux";; \
- *) echo "This system is not supported" ;; \
- esac
-
- # The following is the entry point that triggers the actuall build
-
- rpclib: idlrpc libidl_rpc.$(SHL_EXTENSION)$(SO_VERSION) idl_rpc_test \
- idl_rpc_obsolete.o example
-
- idlrpc: $(SERVER_OBJS)
- rm -f rpc_xdr.o
- $(CC) $(C_FLAGS) rpc_xdr.c
- $(CC) -o idlrpc $(SERVER_OBJS) rpc_xdr.o $(LD_FLAGS)
- rm -f rpc_xdr.o
-
- # Build the client API shared library.
-
- libidl_rpc.$(SHL_EXTENSION)$(SO_VERSION): rpc_clnt.o
- $(CC) $(C_FLAGS) $(SHL_CFLAGS) -DIDL_RPC_CLIENT rpc_xdr.c
- $(LD) $(SHL_LD_FLAGS) -o libidl_rpc.$(SHL_EXTENSION)$(SO_VERSION) \
- rpc_clnt.o rpc_xdr.o
-
- rpc_clnt.o:
- $(CC) $(C_FLAGS) $(SHL_CFLAGS) rpc_clnt.c
-
- # Build the testing routine.
-
- idl_rpc_test: idl_rpc_test.o
- $(CC) -o idl_rpc_test $(TEST_LD_FLAGS) idl_rpc_test.o \
- -lidl_rpc $(TEST_POST)
-
- example : example.o
- $(CC) -o example $(TEST_LD_FLAGS) example.o \
- -lidl_rpc $(TEST_POST)
-
- tidy:
- rm -f $(CLIENT_OBJS) $(SERVER_OBJS)
- clean :
- rm -f libidl_rpc.* idlrpc $(SERVER_OBJS) rpc_clnt.o example.o \
- rpc_xdr.o idl_rpc_test idl_rpc_test.o idl_rpc_obsolete.o
-
- .SUFFIXES: .c .o
-
- .c.o :
- $(CC) $(C_FLAGS) $*.c
-
-