4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / lib / libcurses / Makefile
index 14d8a43..8bb6a4b 100644 (file)
@@ -1,70 +1,20 @@
-#
-# 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.5 (Berkeley) %G%
-#
-CFLAGS=        -O
-LIBC=  /lib/libc.a
-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=  addbytes.o addch.o addstr.o box.o clear.o clrtobot.o clrtoeol.o \
-       cr_put.o cr_tty.o curses.o delch.o deleteln.o delwin.o endwin.o \
-       erase.o fullname.o getch.o getstr.o idlok.o id_subwins.o initscr.o \
-       insch.o insertln.o longname.o move.o mvprintw.o mvscanw.o mvwin.o \
-       newwin.o overlay.o overwrite.o printw.o putchar.o refresh.o scanw.o \
-       scroll.o toucholap.o standout.o touchwin.o tstp.o unctrl.o
-
-.c.o:
-       @${CC} -c -pg ${CFLAGS} $*.c
-       @ld -x -o profiled/$*.o -r $*.o
-       ${CC} ${CFLAGS} -c $*.c
-       @ld -x -r $*.o
-       @mv a.out $*.o
-
-all: libcurses libcurses_p
-
-libcurses libcurses_p: ${OBJS}
-       @echo building profiled libcurses
-       @cd profiled; ar cu ../libcurses_p ${OBJS}
-       ranlib libcurses_p
-       @echo building normal libcurses
-       @ar cu libcurses ${OBJS}
-       ranlib libcurses
-
-clean:
-       rm -f ${OBJS} profiled/*.o libcurses libcurses_p
-
-cleandir: clean
-       rm -f ${MAN} tags .depend
-
-depend: ${SRCS}
-       mkdep ${CFLAGS} ${SRCS}
-
-install:
-       install -o bin -g bin -m 644 libcurses ${DESTDIR}/usr/lib/libcurses.a
-       ranlib ${DESTDIR}/usr/lib/libcurses.a
-       install -o bin -g bin -m 644 libcurses_p ${DESTDIR}/usr/lib/libcurses_p.a
-       ranlib ${DESTDIR}/usr/lib/libcurses_p.a
-
-lint: ${SRCS}
-       lint ${CFLAGS} ${SRCS}
-
-tags: ${SRCS}
-       ctags ${SRCS}
+#      @(#)Makefile    5.16 (Berkeley) %G%
+
+CFLAGS+=#-DTFILE=\"/dev/ttyp0\"
+CFLAGS+=-D_CURSES_PRIVATE -I${.CURDIR}
+LIB=   curses
+SRCS=  addbytes.c addch.c addnstr.c box.c clear.c clrtobot.c clrtoeol.c \
+       cr_put.c ctrace.c curses.c delch.c deleteln.c delwin.c erase.c \
+       fullname.c getch.c getstr.c hash.c id_subwins.c idlok.c initscr.c \
+       insch.c insertln.c longname.c move.c mvwin.c newwin.c overlay.c \
+       overwrite.c printw.c putchar.c refresh.c scanw.c scroll.c setterm.c \
+       standout.c toucholap.c touchwin.c tscroll.c tstp.c tty.c unctrl.c
+MAN3=  curses.0
+
+beforeinstall:
+       -cd ${.CURDIR}; cmp -s curses.h ${DESTDIR}/usr/include/curses.h > \
+           /dev/null 2>&1 || \
+           install -c -o ${BINOWN} -g ${BINGRP} -m 444 curses.h \
+           ${DESTDIR}/usr/include
+
+.include <bsd.lib.mk>