Commit | Line | Data |
---|---|---|
71004f8d KA |
1 | # |
2 | # cursor package maker | |
3 | # | |
b5a01e92 | 4 | # @(#)Makefile 1.14 (Berkeley) %G% |
71004f8d | 5 | # |
1fe7814b | 6 | HEADERS=curses.h unctrl.h curses.ext |
71004f8d KA |
7 | CFILES= 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 | |
14 | OBJS= 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 | |
21 | POBJS= 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 |
28 | CTAGS= ctags |
29 | CC= cc | |
30 | LINT= lint | |
52763c90 | 31 | LPASS1= /usr/lib/lint/lint1 |
71004f8d KA |
32 | AR= ar |
33 | RM= rm | |
34 | LN= ln | |
35 | CFL= | |
36 | CFLAGS= -O ${CFL} | |
59d27330 | 37 | LDFLAGS=-n |
35c58dd7 KA |
38 | INSTALL=${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: | |
4e92489a | 44 | rm -f 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 |
52 | libcurses: ${HEADERS} crlib |
53 | ||
71004f8d KA |
54 | crlib: ${OBJS} |
55 | ${AR} rv crlib $? | |
56 | ranlib crlib | |
57 | ||
58 | pcrlib: ${POBJS} | |
4e92489a KA |
59 | rm -f x.c |
60 | ${AR} rv pcrlib $? | |
71004f8d KA |
61 | ranlib pcrlib |
62 | ||
b5a01e92 KA |
63 | test: libcurses test.o |
64 | ${CC} ${LDFLAGS} ${CFLAGS} -o test test.o crlib -ltermlib | |
71004f8d KA |
65 | |
66 | cat.o: curses.h | |
67 | ${CC} -c ${CFLAGS} cat.c | |
68 | ||
69 | new: 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 | ||
75 | clean: | |
76 | rm ${OBJS} crlib | |
77 | ||
78 | ctags: | |
1fe7814b | 79 | ${CTAGS} ${CFILES} curses.h |
71004f8d KA |
80 | |
81 | lint: | |
82 | ${LINT} -hxb ${CFL} ${CFILES} -lcurses > lint.out | |
83 | ||
84 | lpr: | |
85 | -pr curses.h ${CFILES} | lpr | |
86 | -lpq | |
87 | ||
88 | tp: | |
af702c2c | 89 | tp crm0 Makefile tags ${HEADERS} ${CFILES} llib-lcurses |
71004f8d KA |
90 | |
91 | tar: | |
af702c2c | 92 | tar crvf curses.tar Makefile tags ${HEADERS} ${CFILES} llib-lcurses |
71004f8d | 93 | |
3cdd6458 KA |
94 | ar: |
95 | ar crv curses.ar Makefile tags ${HEADERS} ${CFILES} llib-lcurses | |
96 | ||
71004f8d | 97 | llib-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 |
100 | install: ${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 |