head     1.4;
branch   ;
access   ;
symbols  ;
locks    ;
comment  @# @;


1.4
date     96.05.15.15.11.53;  author lee;  state Exp;
branches ;
next     1.3;

1.3
date     90.10.06.01.28.02;  author lee;  state Rel1-10;
branches ;
next     1.2;

1.2
date     90.10.01.20.33.09;  author lee;  state Exp;
branches ;
next     1.1;

1.1
date     90.08.29.21.48.48;  author lee;  state Exp;
branches ;
next     ;


desc
@Makefile for menu library
@


1.4
log
@ported deps.
@
text
@# Makefile for simple curses-based menu interface.
#
# $Id: Makefile,v 1.3 90/10/06 01:28:02 lee Rel1-10 $

PWD=menu

# PERFORMANCE makes curses go faster
EXTRA=-I../h -DPERFORMANCE
OPT=-O -g
DEFS= -DASCIITRACE -UBSD -DSYSV
WHICHDBM=sdbm
# change the next three lines to be the same as the lq-text definitions.
DBMLIBS=$(INSTALLDIR_LIB)/libsdbm.a

# define bcopy here as bcopy.o if you need it.
# don't use memcpy instead, as memcpy doesn't handle overlapping
# regions of memory.
BCOPY=

# DBMLIBS=-lndbm -linet # 386/ix with hbtcpip provides a good bcopy()

CFLAGS= $(OPT) $(DEFS) -UBSD -DSYSV $(GCCF) -D$(WHICHDBM) $(EXTRA)
CC=/usr/5bin/cc
# TERMCAP=-L/usr/5lib -lcurses -ltermlib
CURSES=-lcurses -ltermcap
TERMCAP=-ltermcap # unused
RANLIB=ranlib

TEXT=lqtext
PROG=m # a simple example of using the library...
PROGOBJS=example.o
PROGSRC=example.c
INSTALLDIR_LIB=../lib
INSTALLDIR_BIN=../bin
LIAMLIB=../liblqutil/liblqutil.a ../liblqerror/liblqerror.a
LQTEXTLIB=../liblqtext/liblqtext.a
MENULIB=liblqmenu.a

PROGS=$(PROG) $(TEXT) # removed by make clean

OBJS=menu.o error.o stringbox.o OldCurses.o
SRCS=menu.c error.c stringbox.c OldCurses.c

# m is a test for the tiny menu library.

all: $(TEXT) # m

install: $(MENULIB) $(TEXT)
	cp $(MENULIB) $(INSTALLDIR_LIB)/$(MENULIB)
	cp $(TEXT) $(INSTALLDIR_BIN)/$(TEXT)
	strip $(INSTALLDIR_BIN)/$(TEXT)

$(TEXT): text.o $(LQTEXTLIB) $(LIAMLIB) $(MENULIB) $(BCOPY)
	$(CC) $(CFLAGS) -o $(TEXT) text.o $(BCOPY) \
	$(MENULIB) $(LQTEXTLIB) $(DBMLIBS) $(LIAMLIB) $(CURSES)

$(MENULIB): $(OBJS)
	rm -f $(MENULIB)
	ar rv $(MENULIB) $(OBJS)
	$(RANLIB) $(MENULIB)

$(PROG): $(PROGOBJS)
	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(PROGOBJS) $(BCOPY) $(CURSES)

lint$(PROG): $(OBJS) $(SRCS) $(PROGSRCS)
	lint $(CFLAGS) $(SRCS) $(CURSES) 2>&1 | tee lint$(PROG)

# Tidy should leave the final executables, but otherwise remove all
# generated files
tidy:
	/bin/rm -f *.o core make.log .mk m.log

# Clean should revert to a distribution state as far as possible
clean:
	/bin/rm -f *.o core *.a $(PROGS) $(CHARGEN) make.log .mk m.log

text.o: text.c
	$(CC) $(CFLAGS) $(TEXTINC) -c text.c


depend:
	chmod +w Makefile
	mkdep $(CFLAGS) *.c

 
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

OldCurses.o: OldCurses.c 
OldCurses.o: oldcurses.h
error.o: error.c 
error.o: internal.h error.h
example.o: example.c 
example.o: oldcurses.h menu.h internal.h error.h
menu.o: menu.c 
menu.o: oldcurses.h menu.h
menu.o: internal.h error.h
stringbox.o: stringbox.c 
stringbox.o: oldcurses.h menu.h
stringbox.o: error.h internal.h
text.o: text.c 
text.o: oldcurses.h 
text.o: ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h ../h/port2.h
text.o: menu.h error.h 
text.o: ../h/fileinfo.h ../h/wordinfo.h
text.o: ../h/pblock.h ../h/wordplace.h ../h/wordrules.h ../h/pblock.h
text.o: ../h/phrase.h ../h/emalloc.h ../h/liblqtext.h 
text.o: ../h/lqconfig.h

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
@


1.3
log
@deleted mkdep output.
@
text
@d3 1
a3 1
# $Id$
d13 7
a19 2
DBMLIBS=$(LIBDIR)/libsdbm.a
BCOPY=bcopy.o
d23 4
a26 2
CC=gcc
TERMCAP=-lcurses
d33 4
a36 4
LIBDIR=../lib
BINDIR=../bin
LIAMLIB=$(LIBDIR)/liblq.a
LQTEXTLIB=$(LIBDIR)/liblqtext.a
d44 1
a44 1
all: $(TEXT) m
d46 2
d49 3
a51 3
	cp $(MENULIB) $(LIBDIR)/$(MENULIB)
	cp $(TEXT) $(BINDIR)/$(TEXT)
	strip $(BINDIR)/$(TEXT)
d55 1
a55 1
	$(MENULIB) $(LQTEXTLIB) $(DBMLIBS) $(LIAMLIB) $(TERMCAP)
d63 1
a63 1
	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(PROGOBJS) $(BCOPY) $(TERMCAP)
d66 1
a66 1
	lint $(CFLAGS) $(SRCS) $(TERMCAP) 2>&1 | tee lint$(PROG)
d82 1
a84 19
#
# $Log:	Makefile,v $
# Revision 1.2  90/10/01  20:33:09  lee
# Added BSD compatibility hooks and improved "make clean".
# 
# Revision 1.1  90/08/29  21:48:48  lee
# Initial revision
# 
# Revision 2.1  89/08/07  13:52:22  lee
# First fully working release; this is the basis for all
# future development.
# 
# Revision 1.2  89/08/04  17:59:23  lee
# Fully working with Basic Functionality.
# Scrolling menubar, scrolling menus, moveable Info windows.
# 
# Revision 1.1  89/07/27  11:41:39  lee
# Initial revision
#
d88 21
@


1.2
log
@Added BSD compatibility hooks and improved "make clean".
@
text
@d3 1
a3 18
# $Header: /home/lee/lq-text/src/menu/RCS/Makefile,v 1.1 90/08/29 21:48:48 lee Exp Locker: lee $
#
# $Log:	Makefile,v $
# Revision 1.1  90/08/29  21:48:48  lee
# Initial revision
# 
# Revision 2.1  89/08/07  13:52:22  lee
# First fully working release; this is the basis for all
# future development.
# 
# Revision 1.2  89/08/04  17:59:23  lee
# Fully working with Basic Functionality.
# Scrolling menubar, scrolling menus, moveable Info windows.
# 
# Revision 1.1  89/07/27  11:41:39  lee
# Initial revision
# 
#
d75 20
a96 43

bcopy.c:
bcopy.o: bcopy.c
character.c:
character.o: character.c /usr/include/malloc.h /usr/include/curses.h
character.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
character.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h menu.h
character.o: error.h
choosefrom.c:
choosefrom.o: choosefrom.c /usr/include/curses.h /usr/include/stdio.h
choosefrom.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
choosefrom.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
choosefrom.o: /usr/include/malloc.h menu.h error.h internal.h
error.c:
error.o: error.c /usr/include/stdio.h /usr/include/curses.h
error.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
error.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
error.o: /usr/include/malloc.h internal.h error.h
example.c:
example.o: example.c /usr/include/malloc.h /usr/include/curses.h
example.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h
example.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h menu.h
example.o: internal.h error.h
explain.c:
explain.o: explain.c
menu.c:
menu.o: menu.c /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h
menu.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
menu.o: /usr/include/sys/ttydev.h /usr/include/malloc.h menu.h internal.h
menu.o: error.h
stringbox.c:
stringbox.o: stringbox.c /usr/include/curses.h /usr/include/stdio.h
stringbox.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
stringbox.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
stringbox.o: /usr/include/malloc.h menu.h error.h internal.h
text.c:
text.o: text.c /usr/include/malloc.h /usr/include/curses.h /usr/include/stdio.h
text.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h
text.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
text.o: /usr/include/ctype.h ../h/globals.h menu.h error.h
text.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ../h/fileinfo.h
text.o: ../h/wordinfo.h ../h/pblock.h ../h/wordrules.h ../h/pblock.h
text.o: ../h/phrase.h
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
# $Header: Makefile,v 2.1 89/08/07 13:52:22 lee Exp $
d6 3
d51 2
a52 2
OBJS=menu.o error.o stringbox.o
SRCS=menu.c error.c stringbox.c
d83 1
a83 1
	/bin/rm -f *.o core $(PROGS) $(CHARGEN) make.log .mk m.log
@
