1# makefile for medserv 2# Sun with unbundled ANSI compiler [ make LCL=acc RAN=ranlib CC=acc ] 3# Sun with Gnu C [ make LCL=gcc RAN=ranlib CC=gcc ] 4# Sun with Solaris 2.x OS [ make LCL=sol CC="cc -Xa" ] 5# Silicon Graphics [ make LCL=sgi OTHERLIBS="-lm -lPW -lsun" ] 6# IBM 3090 with AIX [ make LCL=370 ] 7# ULTRIX [ make LCL=ult RAN=ranlib ] 8# Apple AUX [ make LCL=aux SHELL=\usr\bin ] 9# NeXt [ make LCL=nxt CFLAGS1="-c -ansi" RAN=ranlib ] 10# DEC Alpha under OSF/1 [ make LCL=alf CC=cc RAN=ranlib ] 11# 12# see README for other supported systems 13# 14# Subsequent makes should make ... nocopy instead of make ... all 15# to avoid recopying the include files 16# 17# 18# NOTE: some make utilities (like SGI and IBM 3090) do not like a target 19# which is undefined. This would be $(LIB4) if you are not making a 20# vibrant version. Thus, this library target must be deleted on those 21# systems. The section to be deleted is marked below with DELETE 22# 23 24# default flags for compiling and loading 25 26include $(NCBI)/ncbi.mk 27SUFFIXLCL = $(LCL) 28CCOPT = -g 29CC = $(NCBI_CC) 30RAN = ls 31AR=ar 32LIBS=$(NCBI_SYBLIBS) -lncbimla -lncbiobj -lncbi -lnetcli -ldl $(NCBI_OTHERLIBS) 33LIBDIRS=-L$(NCBI_ALTLIB) -L$(NCBI_SYBASE)/lib 34 35INCLUDES=-I../include -I$(NCBI_SYBASE)/include -I$(NCBI_INCDIR) 36 37CFLAGS=-g $(INCLUDES) 38 39SUFFIXENV = unx 40ASNDIR = asnstat 41LIBMLA = libsybmla.a 42 43 44## 45## some things to make 46## 47 48# sources and objects for medline retrieval 49 50MED_OBJ= cmdline.o getmedart.o ma_global.o ma_intfc.o medart2asn.o \ 51 medretrieve.o mfmt_medasn.o message.o outmedart.o \ 52 password.o patchtoiso.o sqlstring.o sybbind.o sybintfc.o \ 53 voutf.o xalloc.o 54 55MED_SRC= cmdline.c getmedart.c ma_global.c ma_intfc.c medart2asn.c \ 56 medretrieve.c mfmt_medasn.c message.c outmedart.c \ 57 password.c patchtoiso.c sqlstring.c sybbind.c sybintfc.c \ 58 voutf.c xalloc.c 59 60## All things to make 61## 62all : copy nocopy medserv 63 64nocopy : sources $(LIBMLA) 65 66sources : $(MED_SRC) 67 68## To clean out the directory without removing make 69## 70clean : 71 - rm -f *.[acho] 72 73## Implicit actions 74## 75 76 77## get all the source files 78## 79 80copy : 81 - chmod +w ../include/* 82 - chmod +w * 83 cp ../network/medarch/server/*.h ../include 84 cp ../network/medarch/server/*.c . 85 - chmod +w *.c 86 - chmod +w ../include/* 87 - chmod +w * 88 89## make libraries 90## 91 92medretrieve.o : medretrieve.c 93 $(CC) $(CFLAGS) -c -o $@ -DSYSV medretrieve.c 94 95getmedart.o : getmedart.c 96 $(CC) $(CFLAGS) -c -o $@ -DSYSV getmedart.c 97 98$(LIBMLA) : $(MED_OBJ) 99 - rm -f $(LIBMLA) 100 $(AR) cru $(LIBMLA) $(MED_OBJ) 101 cp $(LIBMLA) ../lib 102 $(RAN) ../lib/$(LIBMLA) 103 104# medserv 105 106medserv: medsmain.o $(LIBMLA) 107 $(CC) -g -o medserv medsmain.o ../lib/$(LIBMLA) $(LIBDIRS) $(LIBS) 108 109