# 
# Copyright (C) 1999, 2000, 2001  Network Associates, Incorporated (NAI)
# All rights reserved.
#
# This file is part of the NAI Generic Software Wrappers Toolkit
# (GSWTK).  See ftp://ftp.tislabs.com/pub/wrappers/ for the latest
# distribution.
#
# The GSWTK is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# The GSWTK 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# $Id: Makefile,v 1.12 2001/04/05 18:40:54 stevek Exp $

TOPDIR = ../..

include ${TOPDIR}/mak/config.mak

BUILD_STATIC	= no
BUILD_SHARED	= yes
UNIX_BUILD_PIC	= yes

COPY_SHARED_TO_BIN = yes

SHLIB_MAJOR	= 0
SHLIB_MINOR	= 1

CFLAGS		+= -DWSSLINKAGE=EXPORT -DPDLINKAGE=IMPORT -DEFSLINKAGE=IMPORT
CFLAGS		+= -DSUPPRESS_GLOBAL_EXPORT_TABLE
CFLAGS		+= -DUSER_MODE_TEST
CFLAGS		+= -I ${TOPDIR}/toolkits/eventfs/src
UNIX_CFLAGS	+= -g -Wall -O2
WINNT_CFLAGS	+= /GX /I ${TOPDIR}/gwm 
WINNT_CFLAGS    += -DUNICODE -D_UNICODE

LIBBASE		= linker

OBJS		= wss_evspace${OBJ} wss_export${OBJ} wss_file${OBJ} \
		  wss_linker${OBJ} wss_malloc${OBJ} wss_ref${OBJ} \
		  wss_utilities${OBJ} linker_misc${OBJ}
UNIX_OBJS	= linker_file${OBJ}
WINNT_OBJS	= wsi_file${OBJ}

# WINNT_LDLIBS	+= ${TOPDIR}/toolkits/eventfs/src/${BUILDDIR}/libs/libpipesrv/${LIBPRFX}pipesrv${LIBEXT}
WINNT_LDLIBS	+= ${TOPDIR}/toolkits/eventfs/src/${BUILDDIR}/libs/libmtsync/${LIBPRFX}mtsync${LIBEXT}

include ${TOPDIR}/mak/library.mak

wss_utilities.c: ${TOPDIR}/wss/wss_utilities.c
	${LN} ${TOPDIR}/wss/wss_utilities.c .

wss_ref.c: ${TOPDIR}/wss/wss_ref.c
	${LN} ${TOPDIR}/wss/wss_ref.c .

wss_malloc.c: ${TOPDIR}/wss/wss_malloc.c
	${LN} ${TOPDIR}/wss/wss_malloc.c .

wss_linker.c: ${TOPDIR}/wss/wss_linker.c
	${LN} ${TOPDIR}/wss/wss_linker.c .

wss_file.c: ${TOPDIR}/wss/wss_file.c
	${LN} ${TOPDIR}/wss/wss_file.c .

wss_export.c: ${TOPDIR}/wss/wss_export.c
	${LN} ${TOPDIR}/wss/wss_export.c .

wss_evspace.c: ${TOPDIR}/wss/wss_evspace.c
	${LN} ${TOPDIR}/wss/wss_evspace.c .

wsi_file.c: ${TOPDIR}/wsi/Windows_NT/wsi_file.c
	${LN} ${TOPDIR}/wsi/Windows_NT/wsi_file.c .

