# Makefile for glg

# 'make':		to make libglg.a in this directory
# 'make install':	to make and install
# 'make glgdemo':	to make demo program 'glgdemo'
# 'make clean':		to clean up everything except final products
# 'make veryclean':	to clean up everything (including final products
# 'make depend':	to update the dependency list in this makefile

##############################################
#        BEGIN CONFIGUATION SECTION	     #
#					     #
# Change the macros below to suit your needs #
##############################################

# Compiler options:
OPTIONS = -O -pipe

# LIBDIR should be the dir in which you want to install the library
# file libglg.a.  Comment out this def to prevent 'make install' from
# trying to install libglg.a.
LIBDIR=$(HOME)/lib/$(CPUTYPE)

# INCLDIR should be the directory in which you want to install the glg
# header files. Comment out this def to prevent 'make install' from
# trying to install the header files.  NOTE:  All application programs
# must '#include glg.h'.  glg.h in turn includes the header files for
# the inidividual gadget subpackages.
INCLDIR=$(HOME)/lib/glg

# LIBS should give the library flags to be used in linking the demo
# program 'glgdemo'.
LIBS=-L$(LIBDIR) -lglg -lgl_s

# CP = command to use when installing files
CP=ln

##############################################
#         END CONFIGUATION SECTION	     #
#					     #
#     Don't change anything below here       #
##############################################

SHELL = /bin/sh

COMPILE = cc -c $(OPTIONS)

INSTALL_BIN = instl

INSTALL = $(INSTALL_BIN) -cp "$(CP)"

HEADERS = glg.h sliders.h messages.h buttons.h texts.h

MKDEP = mkdep

LINK = cc $(OPTIONS)

MAKEFILE = Makefile

SRCS = glg.c sliders.c messages.c texts.c buttons.c

OBJS = glg.o sliders.o messages.o texts.o buttons.o

libglg.a:	$(OBJS)
	ar rc libglg.a $(OBJS)

install:	install_lib install_incl

install_lib:	libglg.a
	$(INSTALL) '$(LIBDIR)' libglg.a
		
install_incl:	$(HEADERS)
	$(INSTALL) '$(INCLDIR)' $(HEADERS)

glgdemo:	glgdemo.o libglg.a
	$(LINK) -o glgdemo glgdemo.o $(LIBS)

glgdemo.o:
	$(COMPILE) -o glgdemo.o glgdemo.c

glg.o:
	$(COMPILE) -o glg.o glg.c

sliders.o:
	$(COMPILE) -o sliders.o sliders.c

messages.o:
	$(COMPILE) -o messages.o messages.c

texts.o:
	$(COMPILE) -o texts.o texts.c

buttons.o:
	$(COMPILE) -o buttons.o buttons.c

lint:
	lint $(SRCS)

clean:
	/bin/rm -f *.o *~ #*#

veryclean:	clean
	/bin/rm -f glgdemo libglg.a

distclean:	veryclean

depend:
	$(MKDEP) $(MAKEFILE) glgdemo.c $(SRCS)

# BEGIN DEPENDENCY LIST

glgdemo.o: glgdemo.c
glgdemo.o: ./glg.h
glgdemo.o: ./sliders.h
glgdemo.o: ./messages.h
glgdemo.o: ./texts.h
glgdemo.o: ./buttons.h
glg.o: glg.c
glg.o: ./glg.h
glg.o: ./sliders.h
glg.o: ./messages.h
glg.o: ./texts.h
glg.o: ./buttons.h
glg.o: ./internal.h
sliders.o: sliders.c
sliders.o: ./glg.h
sliders.o: ./sliders.h
sliders.o: ./messages.h
sliders.o: ./texts.h
sliders.o: ./buttons.h
sliders.o: ./sliders.h
sliders.o: ./internal.h
messages.o: messages.c
messages.o: ./glg.h
messages.o: ./sliders.h
messages.o: ./messages.h
messages.o: ./texts.h
messages.o: ./buttons.h
messages.o: ./internal.h
messages.o: ./messages.h
texts.o: texts.c
texts.o: ./glg.h
texts.o: ./sliders.h
texts.o: ./messages.h
texts.o: ./texts.h
texts.o: ./buttons.h
texts.o: ./internal.h
texts.o: ./texts.h
buttons.o: buttons.c
buttons.o: ./glg.h
buttons.o: ./sliders.h
buttons.o: ./messages.h
buttons.o: ./texts.h
buttons.o: ./buttons.h
buttons.o: ./internal.h
buttons.o: ./buttons.h
