#-----------------------------------------------------------------------------#
# Copyright (C) 2000 The University of Melbourne.
# This file may only be copied under the terms of the GNU Library General
# Public License - see the file COPYING.LIB in the Mercury distribution.
#-----------------------------------------------------------------------------#

-include ../Mmake.params

# This library has some parts that are implemented in C
# rather than in Mercury.  The following lines ensure that
# the .h and .o files for those parts get included in the library.
ADDITIONAL_HDRS = posix_workarounds.h text_header.h
MLOBJS = posix_workarounds.$O
MLPICOBJS = posix_workarounds.$(EXT_FOR_PIC_OBJECTS)

.PHONY: default_target
default_target: all

.PHONY: depend
depend: posix.depend hello.depend

.PHONY: all
all: libposix hello

.PHONY: check
check: hello
	./hello

.PHONY: install
install: libposix.install
	cp $(ADDITIONAL_HDRS) $(INSTALL_PREFIX)/lib/mercury/inc

.PHONY: clean
clean:
	-/bin/rm -f posix_workarounds.o

.PHONY: realclean
realclean: clean
