Ken Arnold edits for document distributed with 4.3BSD
[unix-history] / usr / src / lib / libcurses / Makefile
CommitLineData
d96910a1
DF
1#
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6# @(#)Makefile 5.1 (Berkeley) %G%
71004f8d 7#
e378ba16 8# curses package
71004f8d 9#
f70d219c
JB
10CFILES= addch.c addstr.c box.c clear.c clrtobot.c clrtoeol.c cr_put.c \
11 cr_tty.c curses.c delch.c deleteln.c delwin.c endwin.c erase.c \
12 fullname.c getch.c getstr.c idlok.c id_subwins.c initscr.c insch.c \
13 insertln.c longname.c move.c mvprintw.c mvscanw.c mvwin.c newwin.c \
14 overlay.c overwrite.c printw.c putchar.c refresh.c scanw.c scroll.c \
15 toucholap.c standout.c touchwin.c tstp.c unctrl.c
e378ba16
BJ
16OBJS= addch.o addstr.o box.o clear.o clrtobot.o clrtoeol.o cr_put.o \
17 cr_tty.o curses.o delch.o deleteln.o delwin.o endwin.o erase.o \
f70d219c
JB
18 fullname.o getch.o getstr.o idlok.o id_subwins.o initscr.o insch.o \
19 insertln.o longname.o move.o mvprintw.o mvscanw.o mvwin.o newwin.o \
20 overlay.o overwrite.o printw.o putchar.o refresh.o scanw.o scroll.o \
21 toucholap.o standout.o touchwin.o tstp.o unctrl.o
22
71004f8d 23CTAGS= ctags
f70d219c
JB
24DEFS=
25CFLAGS= -O $(DEFS)
818c32a5 26TAGSFILE=tags
e378ba16
BJ
27
28.c.o:
f70d219c 29 ${CC} -c -pg ${CFLAGS} $*.c
e378ba16
BJ
30 ld -x -r $*.o
31 mv a.out profiled/$*.o
32 ${CC} -c ${CFLAGS} $*.c
33 ld -x -r $*.o
34 mv a.out $*.o
35
36libcurses libcurses_p: ${OBJS}
37 @echo building profiled libcurses
f70d219c
JB
38 @cd profiled; ar cu ../libcurses_p ${OBJS}
39 ranlib libcurses_p
e378ba16 40 @echo building normal libcurses
f70d219c
JB
41 @ar cu libcurses ${OBJS}
42 ranlib libcurses
e378ba16
BJ
43
44install: libcurses libcurses_p
45 install -m 644 libcurses ${DESTDIR}/usr/lib/libcurses.a
46 ranlib ${DESTDIR}/usr/lib/libcurses.a
47 install -m 644 libcurses_p ${DESTDIR}/usr/lib/libcurses_p.a
48 ranlib ${DESTDIR}/usr/lib/libcurses_p.a
71004f8d 49
818c32a5
SL
50tags:
51 cwd=`pwd`; \
52 for i in ${CFILES}; do \
53 ctags -a -f ${TAGSFILE} $$cwd/$$i; \
54 done
55
71004f8d 56clean:
818c32a5
SL
57 rm -f ${OBJS} profiled/*.o a.out core test errs \
58 libcurses libcurses_p tags
71004f8d
KA
59
60ctags:
1fe7814b 61 ${CTAGS} ${CFILES} curses.h
71004f8d
KA
62
63lint:
e378ba16 64 lint -hxb ${CFILES} -lcurses > lint.out
71004f8d 65
e378ba16 66test: libcurses test.o
f70d219c
JB
67 ${CC} ${LDFLAGS} ${CFLAGS} -o test test.o libcurses -ltermlib
68
69test.o: test.c
70 ${CC} ${CFLAGS} -c test.c
35c58dd7 71
f70d219c
JB
72ar:
73 ar crv curses.ar ${CFILES} curses.h curses.ext Makefile