# Makefile for lui (Little User Interface?) library

# Version 5 (lui5) is same as LUI 4 but cleaned up for ANSI C


# Original info:
#	"@(#)Makefile	1.2 Stellar 89/03/29"
#			Copyright 1989 by
#			Stellar Computer Inc.
#			All Rights Reserved
#	
#	This software comprises unpublished confidential information of
#	Stellar Computer Inc. and may not be used, copied or made
#	available to anyone, except in accordance with the license
#	under which it is furnished.



default:
	@echo "To make liblui.a, type one of the following:"
	@echo "   make alpha"
	@echo "   make cray"
	@echo "   make dec"
	@echo "   make hp"
	@echo "   make ibm"
	@echo "   make irix4"
	@echo "   make irix5"
	@echo "   make irix6"
	@echo "   make linux"
	@echo "   make stellar"
	@echo "   make sunos4"
	@echo "   make sunos5"
	@echo "If your system is not listed you'll have to edit the Makefile"



debug:
	pmake target \
	"CC = cc" \
	"CFLAGS = -xansi -fullwarn -g" \
	"RANLIB = true"


alpha:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -O -traditional -DDENALI" \
	"RANLIB = true"

cray:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -g" \
	"RANLIB = true"

dec:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -O -Ddec" \
	"RANLIB = ranlib"

hp:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -Aa -D_HPUX_SOURCE -Dhp -I/usr/include/X11R5" \
	"RANLIB = true"

ibm:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -O -Dibm" \
	"RANLIB = true"

irix4:
	pmake target \
	"CC = cc" \
	"CFLAGS = -ansiposix -O" \
	"RANLIB = true"

irix5:
	pmake target \
	"CC = cc" \
	"CFLAGS = -xansi -O" \
	"RANLIB = true"

irix6:
	pmake target \
	"CC = cc" \
	"CFLAGS = -n32 -mips3 -xansi -woff all -O" \
	"RANLIB = true"

linux:
	$(MAKE) target \
	"CC = gcc" \
	"CFLAGS = -g" \
	"RANLIB = ranlib"

sunos4:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -O" \
	"RANLIB = ranlib"

sunos4-gcc:
	$(MAKE) target \
	"CC = gcc" \
	"CFLAGS = -O" \
	"RANLIB = ranlib"

sunos5:
	$(MAKE) target \
	"CC = cc" \
	"CFLAGS = -O -Xa -I/usr/openwin/include" \
	"RANLIB = true"


clean:
	-rm *.o *~


######################################################################


target: liblui.a


HDRS =  		\
	browser.h	\
	button.h	\
	buttonmatrix.h	\
	dial.h		\
	dialog.h	\
	field.h		\
	label.h		\
	layout.h	\
	list.h		\
	newbutton.h	\
	newlabel.h	\
	newslider.h	\
	pixmaps.h	\
	popup.h		\
	radio.h		\
	scrollbar.h	\
	lui.h	

OBJS = 			\
	browser.o	\
	button.o	\
	buttonmatrix.o	\
	colorbar.o	\
	destroy.o	\
	event.o		\
	field.o		\
	label.o		\
	layout.o	\
	list.o		\
	newbutton.o	\
	newlabel.o	\
	newslider.o	\
	pixmaps.o	\
	radio.o		\
	scrollbar.o	\
	lui.o		

liblui.a: $(OBJS)
	ar ruv liblui.a $(OBJS)
	$(RANLIB) liblui.a

.c.o:
	$(CC) -c $(CFLAGS) $<


browser.o: list.h field.h newbutton.h


#############################################################

test: test.o liblui.a
	cc test.o liblui.a -lX11 -o $@


test.o: test.c
	cc -c -g -cckr test.c



testlui.o: testlui.c
	cc -c -g -cckr testlui.c

testlui: testlui.o
	cc testlui.o liblui.a -lX11 -o $@


bm: bm.o
	cc bm.o liblui.a -lX11 -o $@

bm.o: bm.c
	cc -c -g -cckr bm.c
