## ----- 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 = -lZafMtf $(GUI_LIBS) $(LIBS)

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

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

posix: mdata1 mdata2 mdata3 mdata4

clean:
	-rm -f *.o core mdata1 mdata2 mdata3 mdata4

mdata1: data1.o
	$(LINK) $(LINK_FLAGS) -o $@ data1.o $(Z_LIB_DIRS) $(Z_LIBS)

mdata2: data2.o
	$(LINK) $(LINK_FLAGS) -o $@ data2.o $(Z_LIB_DIRS) $(Z_LIBS)

mdata3: data3.o
	$(LINK) $(LINK_FLAGS) -o $@ data3.o $(Z_LIB_DIRS) $(Z_LIBS)

mdata4:
	echo You must have the Professional version of ZAF to build Data4
