## Define the appropriate configuration variables.

PACKAGE = /fsys2/u2/usystem/software/u++-5.0.1

## Include the architecture dependent definitions.

include $(PACKAGE)/CONFIG

## Define the path names of important directories.

SRCDIR = $(PACKAGE)/src/library

## Define some of the tools.

include ../MakeTools

## Define the C++ source files.

LIBSRC = $(addprefix $(SRCDIR)/, $(addsuffix .cc, \
uIOcntl \
uFile \
uFilebuf \
uIOEvent \
uIos \
uIStream \
uOStream \
uFStream \
uPoll \
uSocket \
uSemaphore \
semaphore \
pthread \
usema \
Unix \
) )

LIBSRC-D = $(LIBSRC)
ifeq ($(MULTI),TRUE)
	LIBSRC-M = $(LIBSRC)
	LIBSRC-M-D = $(LIBSRC)
endif

## Define the header files

HEADERS = $(shell ls *.h)

## Define which libraries should be built.

LIB = $(LIBDIR)/uLibrary.a
LIB-D = $(LIBDIR)/uLibrary-d.a
ifeq ($(MULTI),TRUE)
	LIB-M = $(LIBDIR)/uLibrary-m.a
	LIB-M-D = $(LIBDIR)/uLibrary-m-d.a
endif

## Define the things that can be defined based upon previous definitions.

include ../MakeDefinitions

## Define the specific recipes.

all : $(LIBRARIES)

install : all $(addprefix $(INSTALLLIBDIR)/, $(notdir $(LIBRARIES))) $(addprefix $(INSTALLINCDIR)/, $(HEADERS))

## Define default dependencies and recipes for object files.

include ../MakeRecipes

## Include the dependencies for object files and libraries.

-include $(DEPENDS)

## Create directories (TEMPORARY: fixed in gmake 3.80)

_xxx1 := $(shell mkdir -p $(LIBDIR) $(OBJDIR))

ifeq ($(MAKECMDGOALS),install)
_xxx2 := $(shell mkdir -p $(INSTALLLIBDIR) $(INSTALLINCDIR))
endif

## Local Variables: ##
## compile-command: "gmake install" ##
## End: ##
