$NetBSD: patch-aa,v 1.3 2007/09/02 11:45:06 kei Exp $ --- Makefile.orig 1996-11-11 23:43:22.000000000 +0900 +++ Makefile 2007-07-17 14:08:03.000000000 +0900 @@ -25,29 +25,33 @@ INTERNAL_REVISION=7 ARCFILE=netmaj-$(VERSION).$(REVISION).$(INTERNAL_REVISION).tar.gz -SHELL=/bin/sh +SHELL=${SH} # Install Directory -LIBDIR=/usr/local/lib/netmaj -BINDIR=/usr/local/bin -PERL=/usr/bin/perl +LIBDIR=${PREFIX}/lib/netmaj +BINDIR=${PREFIX}/bin +PERL=${PERL5} STD_CFLAGS=-I. -Ilib -DNETMAJ_LIB=\"$(LIBDIR)\" # for 386BSD,FreeBSD,NetBSD... +.if (${OPSYS} == "NetBSD") || (${OPSYS} == "FreeBSD") || (${OPSYS} == "DragonFly") CC=gcc OS_CFLAGS= -O -g -DUSE_SGTTY -DUSE_FWOPEN -DUSE_TERMCAP -DHAVE_GETTIMEOFDAY RANLIB=ranlib LIBS= CURSES= -lcurses -ltermcap LDFLAGS = -Llib +.endif # for linux -#CC=cc -#OS_CFLAGS= -O -DUSE_TERMIOS -DUSE_TERMCAP -DDEF_OPTARG -DHAVE_GETTIMEOFDAY -#RANLIB=ranlib -#LIBS = -#CURSES= lib/libcurses.a -ltermcap -#LDFLAGS = -Llib +.if (${OPSYS} == "Linux") +CC=cc +OS_CFLAGS= -O -DUSE_TERMIOS -DUSE_TERMCAP -DDEF_OPTARG -DHAVE_GETTIMEOFDAY +RANLIB=ranlib +LIBS = +CURSES= -lncurses +LDFLAGS = -Llib +.endif # for nec ews ##CC=/usr/abiccs/bin/cc -ZXNd=5000 @@ -60,13 +64,15 @@ #LDFLAGS = -Llib # for Solaris -#CC=cc -#OS_CFLAGS = -O -DSYSV -DSVR4 -DUSE_TERMIOS -DUSE_TERMINFO -D_ENDWIN_INCURSES \ -# -DUSE_RAND -DHAVE_GETTIMEOFDAY -#RANLIB=echo -#LIBS = -lsocket -lnsl -#CURSES= -lcurses -ltermcap -#LDFLAGS = -Llib +.if (${OPSYS} == "SunOS") +CC=cc +OS_CFLAGS = -O -DSYSV -DSVR4 -DUSE_TERMIOS -DUSE_TERMINFO -D_ENDWIN_INCURSES \ + -DUSE_RAND -DHAVE_GETTIMEOFDAY +RANLIB=echo +LIBS = -lsocket -lnsl +CURSES= -lcurses -ltermcap +LDFLAGS = -Llib +.endif # for nec ews (SVR2) #CC=cc @@ -163,9 +169,9 @@ x: -if test -d xui; then \ (cd xui; make CC="$(CC)" OS_CFLAGS="$(OS_CFLAGS)" \ - RANLIB="$(RANLIB)" LIBS="$(LIBS)" LIBDIR="$(LIBDIR) \ + RANLIB="$(RANLIB)" LIBS="$(LIBS)" LIBDIR="$(LIBDIR)" \ BINDIR="$(BINDIR)" \ - "); fi + ); fi netmaj: netmaj.in Makefile