## ----- Install options -----
CC = CC
LINK = CC
CC_FLAGS =
LINK_FLAGS =
CPP_EXTENSION = .cpp
INCLUDE_DIRS =
LIB_DIRS = -L/usr/lib/Motif1.2 -L/usr/lib/X11R5
GUI_LIBS = -lXm -lXt -lX11
LIBS = -lm

## ----- General options -----
ZAF_INC_DIR = ../../include
ZAF_LIB_DIR = ../../lib
Z_INCLUDE_DIRS = -I. -I$(ZAF_INC_DIR) $(INCLUDE_DIRS)
Z_LIB_DIRS = -L$(ZAF_LIB_DIR) $(LIB_DIRS)
Z_LIBS = -lZafMtfP -lZafMtf $(GUI_LIBS) $(LIBS)

.SUFFIXES:
.SUFFIXES: .o $(CPP_EXTENSION)

$(CPP_EXTENSION).o:
	$(CC) $(CC_FLAGS) $(Z_INCLUDE_DIRS) -c $<

posix: mbignum minteger mreal mtime mdate mutime

clean:
	-rm -f *.o core mbignum minteger mreal mtime mdate mutime

mbignum: bignum.o bnumwn.o
	$(LINK) $(LINK_FLAGS) -o $@ bignum.o bnumwn.o $(Z_LIB_DIRS) $(Z_LIBS)

minteger: integer.o intwn.o
	$(LINK) $(LINK_FLAGS) -o $@ integer.o intwn.o $(Z_LIB_DIRS) $(Z_LIBS)

mreal: real.o realwn.o
	$(LINK) $(LINK_FLAGS) -o $@ real.o realwn.o $(Z_LIB_DIRS) $(Z_LIBS)

mdate: date.o datewn.o
	$(LINK) $(LINK_FLAGS) -o $@ date.o datewn.o $(Z_LIB_DIRS) $(Z_LIBS)

mtime: time.o timewn.o
	$(LINK) $(LINK_FLAGS) -o $@ time.o timewn.o $(Z_LIB_DIRS) $(Z_LIBS)

mutime: utime.o utimewn.o
	$(LINK) $(LINK_FLAGS) -o $@ utime.o utimewn.o $(Z_LIB_DIRS) $(Z_LIBS)
