use rm -f consistently
[unix-history] / usr / src / lib / libcurses / Makefile
CommitLineData
71004f8d
KA
1#
2# cursor package maker
3#
cb21fc0b 4# @(#)Makefile 1.15 (Berkeley) %G%
71004f8d 5#
1fe7814b 6HEADERS=curses.h unctrl.h curses.ext
71004f8d
KA
7CFILES= box.c clear.c initscr.c endwin.c mvprintw.c mvscanw.c mvwin.c \
8 newwin.c overlay.c overwrite.c printw.c scanw.c refresh.c \
9 touchwin.c erase.c clrtobot.c clrtoeol.c cr_put.c cr_tty.c \
10 longname.c delwin.c insertln.c deleteln.c scroll.c getstr.c \
4628895b 11 getch.c addstr.c addch.c move.c curses.c unctrl.c standout.c \
4740f2a5 12 tstp.c insch.c delch.c
71004f8d
KA
13
14OBJS= box.o clear.o initscr.o endwin.o mvprintw.o mvscanw.o mvwin.o \
15 newwin.o overlay.o overwrite.o printw.o scanw.o refresh.o \
16 touchwin.o erase.o clrtobot.o clrtoeol.o cr_put.o cr_tty.o \
17 longname.o delwin.o insertln.o deleteln.o scroll.o getstr.o \
4628895b 18 getch.o addstr.o addch.o move.o curses.o unctrl.o standout.o \
4740f2a5 19 tstp.o insch.o delch.o
71004f8d
KA
20
21POBJS= box.p clear.p initscr.p endwin.p mvprintw.p mvscanw.p mvwin.p \
22 newwin.p overlay.p overwrite.p printw.p scanw.p refresh.p \
23 touchwin.p erase.p clrtobot.p clrtoeol.p cr_put.p cr_tty.p \
24 longname.p delwin.p insertln.p deleteln.p scroll.p getstr.p \
4628895b 25 getch.p addstr.p addch.p move.p curses.p unctrl.p standout.p \
4740f2a5 26 tstp.p insch.p delch.p
71004f8d 27
71004f8d
KA
28CTAGS= ctags
29CC= cc
30LINT= lint
52763c90 31LPASS1= /usr/lib/lint/lint1
71004f8d 32AR= ar
cb21fc0b 33RM= rm -f
71004f8d
KA
34LN= ln
35CFL=
36CFLAGS= -O ${CFL}
59d27330 37LDFLAGS=-n
35c58dd7
KA
38INSTALL=${DESTDIR}/usr/lib/libcurses.a ${DESTDIR}/usr/include/curses.h \
39 ${DESTDIR}/usr/include/unctrl.h ${DESTDIR}/usr/lib/lint/llib-lcurses.ln
40
71004f8d
KA
41.SUFFIXES: .p
42
43.c.p:
cb21fc0b 44 ${RM} x.c
71004f8d
KA
45 ln $*.c x.c
46 ${CC} ${CFLAGS} -p -c x.c
4e92489a 47 mv x.o $*.p
71004f8d 48
3cdd6458
KA
49.DEFAULT:
50 sccs get $@
51
5b47f638
KA
52libcurses: ${HEADERS} crlib
53
71004f8d
KA
54crlib: ${OBJS}
55 ${AR} rv crlib $?
56 ranlib crlib
57
58pcrlib: ${POBJS}
cb21fc0b 59 ${RM} x.c
4e92489a 60 ${AR} rv pcrlib $?
71004f8d
KA
61 ranlib pcrlib
62
b5a01e92
KA
63test: libcurses test.o
64 ${CC} ${LDFLAGS} ${CFLAGS} -o test test.o crlib -ltermlib
71004f8d
KA
65
66cat.o: curses.h
67 ${CC} -c ${CFLAGS} cat.c
68
69new: cleanup ctags
70 ${CC} -c ${CFLAGS} ${CFILES}
71 ${AR} qv crlib ${OBJS}
72 ${RM} /ya/staff/arnold/=eye/crlib /ya/staff/arnold/=hacks/crlib \
73 /ya/staff/arnold/=eye/curses.h /ya/staff/arnold/=hacks/curses.h
74
75clean:
cb21fc0b 76 ${RM} ${OBJS} crlib
71004f8d
KA
77
78ctags:
1fe7814b 79 ${CTAGS} ${CFILES} curses.h
71004f8d
KA
80
81lint:
82 ${LINT} -hxb ${CFL} ${CFILES} -lcurses > lint.out
83
84lpr:
85 -pr curses.h ${CFILES} | lpr
86 -lpq
87
88tp:
af702c2c 89 tp crm0 Makefile tags ${HEADERS} ${CFILES} llib-lcurses
71004f8d
KA
90
91tar:
af702c2c 92 tar crvf curses.tar Makefile tags ${HEADERS} ${CFILES} llib-lcurses
71004f8d 93
3cdd6458
KA
94ar:
95 ar crv curses.ar Makefile tags ${HEADERS} ${CFILES} llib-lcurses
96
71004f8d 97llib-lcurses.ln: llib-lcurses
52763c90 98 -(/lib/cpp -C -Dlint llib-lcurses | ${LPASS1} > llib-lcurses.ln ) 2>&1 | grep -v warning
71004f8d 99
35c58dd7
KA
100install: ${INSTALL}
101
102${DESTDIR}/usr/lib/libcurses.a: crlib
71004f8d
KA
103 install -c crlib ${DESTDIR}/usr/lib/libcurses.a
104 ranlib ${DESTDIR}/usr/lib/libcurses.a
35c58dd7
KA
105
106${DESTDIR}/usr/include/curses.h: curses.h
107 install -c curses.h ${DESTDIR}/usr/include/
108
109${DESTDIR}/usr/include/unctrl.h: unctrl.h
110 install -c unctrl.h ${DESTDIR}/usr/include/
111
112${DESTDIR}/usr/lib/lint/llib-lcurses.ln: llib-lcurses.ln
113 install -c llib-lcurses ${DESTDIR}/usr/lib/lint
114 install -c llib-lcurses.ln ${DESTDIR}/usr/lib/lint