# The following variables are configurable.
#-----------------------------------#
LOCALCFLAGS := 
LOCALIFLAGS := 
LOCALLFLAGS :=
LOCALSFLAGS :=

LIB := ../liblwp.a
LINTNAME := lwp
#-----------------------------------#

# Productions:
#	depend:	create the dependencies
#	all:	make the library
#	saber:	load things for saber
#	tags:	make tags

include ../../make/GenMakefile
include $(DEPENDENCIES)
include ../../make/LibMakefile
#LOCALCFLAGS := -g
# The following is needed because only AIX 3.2.x needs to have these as-
# sembler programs.  If AIX32 is "Y", then the three files listed below
# are updated from the '.dist' files of the same name (if the .dist file
# has changed.)  If AIX32 is not "Y", then the three .s files, and any
# .o files that exist are blown away.
#
# NOTE: If you need to make changes to the lwp{Save, Restore, Init}.s
# files, do so in the lwp*.s.dist version.

ifeq "$(AIX32)" "Y"

aixfixup: lwpSave.s lwpRestore.s lwpInit.s

%.s: %.s.dist
	@cp $? $@

else

aixfixup:
	@rm -f lwpSave.[so]
	@rm -f lwpRestore.[so]
	@rm -f lwpInit.[so]

endif

# The following is needed for MIPS because the default compiler for the
# MIPS ultrix machines doesn't understand asm keywords, so the
# mipsarch.s assembler file is needed.  Otherwise, remove the mipsarch.s
# and mipsarch.o file (along the same lines as the AIX patch above.)
# If you need to make changes, make them to the mipsarch.s.dist file.

ifeq "$(MIPS)" "Y" 

mipsfixup: mipsarch.s

%.s: %.s.dist
	cp $? $@

else

mipsfixup:
	echo "$(MIPS)"	
	rm -f mipsarch.[so]

endif

depend:	aixfixup mipsfixup

tags: ../tags
	ln -s ../tags

TAGS: ../TAGS
	ln -s ../TAGS

