## ----- Install options -----
ZAF_ROOT_DIR = ../../..
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 -----
CF_INCLUDE_DIR = ../../include
ALL_INCLUDE_DIRS = -I. -I$(ZAF_ROOT_DIR)/include -I$(CF_INCLUDE_DIR) $(INCLUDE_DIRS)
ALL_LIB_DIRS = -L$(ZAF_ROOT_DIR)/lib $(LIB_DIRS)
ALL_LIBS = -lcfzaf -lZafMtfP -lZafMtf $(GUI_LIBS) $(LIBS)

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

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

posix: area_cht bar_cht colm_cht line_cht pie_cht pnt_cht stk_cht

clean:
	-rm -f *.o core area_cht bar_cht colm_cht line_cht pie_cht pnt_cht stk_cht

area_cht: area_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ area_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

bar_cht: bar_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ bar_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

colm_cht: colm_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ colm_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

line_cht: line_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ line_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

pie_cht: pie_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ pie_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

pnt_cht: pnt_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ pnt_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

stk_cht: stk_cht.o
	$(LINK) $(LINK_FLAGS) -o $@ stk_cht.o $(ALL_LIB_DIRS) $(ALL_LIBS)

