| 1 | # |
| 2 | # Copyright (c) 1987 Regents of the University of California. |
| 3 | # All rights reserved. |
| 4 | # |
| 5 | # Redistribution and use in source and binary forms are permitted |
| 6 | # provided that the above copyright notice and this paragraph are |
| 7 | # duplicated in all such forms and that any documentation, |
| 8 | # advertising materials, and other materials related to such |
| 9 | # distribution and use acknowledge that the software was developed |
| 10 | # by the University of California, Berkeley. The name of the |
| 11 | # University may not be used to endorse or promote products derived |
| 12 | # from this software without specific prior written permission. |
| 13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 16 | # |
| 17 | # @(#)Makefile 5.8 (Berkeley) %G% |
| 18 | # |
| 19 | CFLAGS= -O |
| 20 | LIBC= /lib/libc.a |
| 21 | SRCS= addbytes.c addch.c addstr.c box.c clear.c clrtobot.c clrtoeol.c \ |
| 22 | cr_put.c cr_tty.c curses.c delch.c deleteln.c delwin.c endwin.c \ |
| 23 | erase.c fullname.c getch.c getstr.c idlok.c id_subwins.c initscr.c \ |
| 24 | insch.c insertln.c longname.c move.c mvprintw.c mvscanw.c mvwin.c \ |
| 25 | newwin.c overlay.c overwrite.c printw.c putchar.c refresh.c scanw.c \ |
| 26 | scroll.c toucholap.c standout.c touchwin.c tstp.c unctrl.c |
| 27 | OBJS= addbytes.o addch.o addstr.o box.o clear.o clrtobot.o clrtoeol.o \ |
| 28 | cr_put.o cr_tty.o curses.o delch.o deleteln.o delwin.o endwin.o \ |
| 29 | erase.o fullname.o getch.o getstr.o idlok.o id_subwins.o initscr.o \ |
| 30 | insch.o insertln.o longname.o move.o mvprintw.o mvscanw.o mvwin.o \ |
| 31 | newwin.o overlay.o overwrite.o printw.o putchar.o refresh.o scanw.o \ |
| 32 | scroll.o toucholap.o standout.o touchwin.o tstp.o unctrl.o |
| 33 | MAN= curses.0 |
| 34 | |
| 35 | .c.o: |
| 36 | @${CC} -c -pg ${CFLAGS} $*.c |
| 37 | @ld -x -o profiled/$*.o -r $*.o |
| 38 | ${CC} ${CFLAGS} -c $*.c |
| 39 | @ld -x -r $*.o |
| 40 | @mv a.out $*.o |
| 41 | |
| 42 | all: libcurses.a libcurses_p.a |
| 43 | |
| 44 | libcurses.a libcurses_p.a: ${OBJS} |
| 45 | @echo building normal libcurses |
| 46 | @ar cu libcurses.a ${OBJS} |
| 47 | ranlib libcurses.a |
| 48 | @echo building profiled libcurses |
| 49 | @cd profiled; ar cu ../libcurses_p.a ${OBJS} |
| 50 | ranlib libcurses_p.a |
| 51 | |
| 52 | clean: |
| 53 | rm -f ${OBJS} profiled/*.o libcurses.a libcurses_p.a |
| 54 | |
| 55 | cleandir: clean |
| 56 | rm -f ${MAN} tags .depend |
| 57 | |
| 58 | depend: ${SRCS} |
| 59 | mkdep ${CFLAGS} ${SRCS} |
| 60 | |
| 61 | install: ${MAN} |
| 62 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat3 |
| 63 | install -o bin -g bin -m 644 libcurses.a ${DESTDIR}/usr/lib |
| 64 | ranlib -t ${DESTDIR}/usr/lib/libcurses.a |
| 65 | install -o bin -g bin -m 644 libcurses_p.a ${DESTDIR}/usr/lib |
| 66 | ranlib -t ${DESTDIR}/usr/lib/libcurses_p.a |
| 67 | |
| 68 | lint: ${SRCS} |
| 69 | lint ${CFLAGS} ${SRCS} |
| 70 | |
| 71 | tags: ${SRCS} |
| 72 | ctags -dt ${SRCS} curses.h |