# Makefile for moreButtons
#
# moreButtons : button widgets for Tk
# Copyright (C) 1993 Daniel Simmons, Michael Hewitt & Idaho State University
# For distribution terms see the file COPYING (GNU GPL)

# To configure for installation:
#   - set BINDIR to directory where you want to install mb_wish
#   - set LIBDIR to the tk library directory
#   - set MANDIR to the directory containing tk's man pages

PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib/tk
MANDIR = $(PREFIX)/man/mann

# To configure for compilation:
#   - make sure your compiler will accept ansi code (-Ae does that on 
#     HPUX w/the 9.01 developer kit)
#   - modify the -I arguments in CFLAGS so that your C compiler will 
#     find the X, Tcl and Tk header files
#   - modify the -L arguments in LDFLAGS so that your linker will find
#     the X, Tcl and Tk libraries

CC      = cc -Ae
CFLAGS  = -O -I/usr/include/X11R5 -I/share/gen/include
LDFLAGS = -L/usr/lib/X11R5 -lX11 -L/share/gen/lib -ltk -ltcl -lm


# ------ you probably don't want to modify anything below this line -------

   TARGET = mb_wish
  SOURCES = mb_wish.c studButton.c triButton.c
  OBJECTS = mb_wish.o studButton.o triButton.o

all: $(TARGET)

clean:
	-rm -f $(TARGET) $(OBJECTS) *~ *.bak *.ln

install:
	-mv $(BINDIR)/mb_wish $(BINDIR)/mb_wish.old
	cp mb_wish $(BINDIR)/mb_wish
	chmod 755 $(BINDIR)/mb_wish
	cp mb_wish $(LIBDIR)/mb.tcl
	chmod 644 $(LIBDIR)/mb.tcl
	cp mb_wish $(MANDIR)/studbutton.n
	chmod 644 $(MANDIR)/studbutton.n
	cp mb_wish $(MANDIR)/tributton.n
	chmod 644 $(MANDIR)/tributton.n

$(TARGET): $(OBJECTS)
	$(CC) $(CFLAGS) -o $(TARGET) $(OBJECTS) $(LDFLAGS)

#### dependencies: ####

mb_wish.o: studButton.h triButton.h mb_wish.c
studButton.o: studButton.c studButton.h
triButton.o: triButton.c triButton.h
