#
# Copyright (c) 1987 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley.  The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#	@(#)Makefile	5.4 (Berkeley) 6/30/88
#
M*=s
CC=cc -${P} -m$M
CFLAGS=-Osax -w3 -zc -zl $Z -Dlint
SRCS=	addbytes.c addch.c addstr.c box.c clear.c clrtobot.c clrtoeol.c \
	cr_put.c cr_tty.c curses.c delch.c deleteln.c delwin.c endwin.c \
	erase.c fullname.c getch.c getstr.c idlok.c id_subwins.c initscr.c \
	insch.c insertln.c longname.c move.c mvprintw.c mvscanw.c mvwin.c \
	newwin.c overlay.c overwrite.c printw.c putchar.c refresh.c scanw.c \
	scroll.c toucholap.c standout.c touchwin.c tstp.c unctrl.c
OBJS=	$(SRCS:.c=.o)

all .SEQUENTIAL: small large compact medium huge

small:;   $(MAKE) M=s P=2 cursess.lib
compact:; $(MAKE) M=c P=2 Z=-zu cursesc.lib
huge:;    $(MAKE) M=h P=2 Z=-zu cursesh.lib
large:;   $(MAKE) M=l P=2 Z=-zu cursesl.lib
medium:;  $(MAKE) M=m P=2 cursesm.lib
386:;	  $(MAKE) M=s P=3 curses3r.lib

curses$M.lib .LIBRARY: ${OBJS}

curses3r.lib .LIBRARY: ${OBJS}

clean: FRC
	rm -f ${OBJS} curses.lib

depend: FRC
	mkdep ${CFLAGS} ${SRCS}

install: FRC
	install -o bin -g bin -m 644 curses.lib ${DESTDIR}/usr/lib/curses.lib
	ranlib ${DESTDIR}/usr/lib/curses.lib

lint: FRC
	lint ${CFLAGS} ${SRCS}

tags: FRC
	ctags ${SRCS}

FRC:

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

$(OBJS): curses.ext curses.h
