--- netcmp/Makefile.orig 2011-10-21 07:35:56.000000000 +0900 +++ netcmp/Makefile 2012-02-22 16:42:56.000000000 +0900 @@ -22,7 +22,7 @@ # # netcmp makefile -BINDIR= ../bin +BINDIR= ${PREFIX}/bin ## ## (1) Choosing your compiler @@ -48,7 +48,7 @@ ## For SGI, cc is recommended CHIPMUNKCC = gcc -O3 -CC = $(CHIPMUNKCC) +CC ?= $(CHIPMUNKCC) ## ## (2) Adding appropriate flags @@ -77,15 +77,17 @@ ## -ansi ## +OTHERLIBS = -lcompat + CHIPMUNKFLAGS = -CFLAGS = $(CHIPMUNKFLAGS) +CFLAGS += -DBSD -DF_OK netcmp: main.o parser.o datastruct.o compare.o - $(CC) $(CFLAGS) parser.o datastruct.o compare.o main.o -o netcmp + $(CC) $(CFLAGS) parser.o datastruct.o compare.o main.o $(OTHERLIBS) -o netcmp install: netcmp - cp netcmp $(BINDIR) + ${BSD_INSTALL_PROGRAM} netcmp $(BINDIR) clean: -rm -f *.o netcmp