| 1 | # |
| 2 | # cursor package maker |
| 3 | # |
| 4 | # @(#)Makefile 1.13 (Berkeley) %G% |
| 5 | # |
| 6 | HEADERS=curses.h unctrl.h curses.ext |
| 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 \ |
| 11 | getch.c addstr.c addch.c move.c curses.c unctrl.c standout.c \ |
| 12 | tstp.c insch.c delch.c |
| 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 \ |
| 18 | getch.o addstr.o addch.o move.o curses.o unctrl.o standout.o \ |
| 19 | tstp.o insch.o delch.o |
| 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 \ |
| 25 | getch.p addstr.p addch.p move.p curses.p unctrl.p standout.p \ |
| 26 | tstp.p insch.p delch.p |
| 27 | |
| 28 | CTAGS= ctags |
| 29 | CC= cc |
| 30 | LINT= lint |
| 31 | LPASS1= /usr/lib/lint/lint1 |
| 32 | AR= ar |
| 33 | RM= rm |
| 34 | LN= ln |
| 35 | CFL= |
| 36 | CFLAGS= -O ${CFL} |
| 37 | LDFLAGS=-n |
| 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 | |
| 41 | .SUFFIXES: .p |
| 42 | |
| 43 | .c.p: |
| 44 | rm -f x.c |
| 45 | ln $*.c x.c |
| 46 | ${CC} ${CFLAGS} -p -c x.c |
| 47 | mv x.o $*.p |
| 48 | |
| 49 | .DEFAULT: |
| 50 | sccs get $@ |
| 51 | |
| 52 | libcurses: ${HEADERS} crlib |
| 53 | |
| 54 | crlib: ${OBJS} |
| 55 | ${AR} rv crlib $? |
| 56 | ranlib crlib |
| 57 | |
| 58 | pcrlib: ${POBJS} |
| 59 | rm -f x.c |
| 60 | ${AR} rv pcrlib $? |
| 61 | ranlib pcrlib |
| 62 | |
| 63 | test: crlib test.o |
| 64 | ${CC} ${LDFLAGS} ${CFLAGS} -o test test.o -lcurses -ltermlib |
| 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: |
| 79 | ${CTAGS} ${CFILES} curses.h |
| 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: |
| 89 | tp crm0 Makefile tags ${HEADERS} ${CFILES} llib-lcurses |
| 90 | |
| 91 | tar: |
| 92 | tar crvf curses.tar Makefile tags ${HEADERS} ${CFILES} llib-lcurses |
| 93 | |
| 94 | ar: |
| 95 | ar crv curses.ar Makefile tags ${HEADERS} ${CFILES} llib-lcurses |
| 96 | |
| 97 | llib-lcurses.ln: llib-lcurses |
| 98 | -(/lib/cpp -C -Dlint llib-lcurses | ${LPASS1} > llib-lcurses.ln ) 2>&1 | grep -v warning |
| 99 | |
| 100 | install: ${INSTALL} |
| 101 | |
| 102 | ${DESTDIR}/usr/lib/libcurses.a: crlib |
| 103 | install -c crlib ${DESTDIR}/usr/lib/libcurses.a |
| 104 | ranlib ${DESTDIR}/usr/lib/libcurses.a |
| 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 |