#
# samples Make File < Makefile >
#
# Target sample programs on TeX documents: Borland Graphics Interface for Xlib
#
# Copyright (c) 1992-94 Tokyo Denki University, Taiji Yamada
#
    XBGI = xbgi-2.1             # this name
XBGI_DIR = $(HOME)/$(XBGI)      # the directory

      CC = gcc
   X_DIR = /share3/X11R5

   LINKS = -lgraphics -lXpm -lX11 -ljmskanji -lm
#
# libgraphics.a             : this XBGI library
# libXpm.a                  : it's need if defined ENABLE_XPMLIB
# libjmskanji.a             : it's need if defined ENABLE_BILINGUAL
#

  CFLAGS = -g

# -----------------------------------------------------------------------------

INC_PATH = -I$(XBGI_DIR)/include -I$(X_DIR)/include \
           -I$(XBGI_DIR)/include/graphics
LIB_PATH = -L$(XBGI_DIR)/lib     -L$(X_DIR)/lib

 TARGETS = attract \
           bgidemo \
           carpet  \
           chaos   \
           clock   \
           colors  \
           draw    \
           hello   \
           hello2  \
           mandara \
           mandel  \
           message \
           recurse \
           pages   \
           pages2  \
           pages3  \
           pages4  \
           recurse \
           sponge

.c: $(XBGI_DIR)/lib/libgraphics.a
	$(CC) $(CFLAGS) $@.c -o $@ $(INC_PATH) $(LIB_PATH) $(LINKS)

all: $(TARGETS)

clean:
	rm -rf $(TARGETS)
	rm -rf core *~
