$NetBSD: patch-aa,v 1.4 2005/07/31 14:03:28 grant Exp $ --- Makefile.orig 2004-11-13 11:25:31.000000000 +1100 +++ Makefile @@ -14,11 +14,11 @@ prefix = /usr/local exec_prefix = ${prefix} -bindir = ${exec_prefix}/bin +bindir = ${PREFIX}/bin ######################################### -CC = gcc +#CC = gcc OBJ = open2300.o rw2300.o linux2300.o win2300.o LOGOBJ = log2300.o rw2300.o linux2300.o win2300.o FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o @@ -37,8 +37,8 @@ MINMAXOBJ = minmax2300.o rw2300.o linux2 VERSION = 1.8 -CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\" -CC_LDFLAGS = -lm +CFLAGS += -DVERSION=\"$(VERSION)\" ${CPPFLAGS} +CC_LDFLAGS = ${LDFLAGS} ${LIBS} -lm CC_WINFLAG = # For Windows - comment the two line above and un-comment the two lines below. # CC_LDFLAGS = -lwsock32 -fno-exceptions -s @@ -80,7 +80,7 @@ xml2300 : $(XMLOBJ) $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) mysql2300: $(MYSQLOBJ) - $(CC) $(CFLAGS) -o $@ $(MYSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient + $(CC) $(CFLAGS) -o $@ $(MYSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) light2300: $(LIGHTOBJ) $(CC) $(CFLAGS) -o $@ $(LIGHTOBJ) $(CC_LDFLAGS) @@ -92,19 +92,23 @@ minmax2300: $(MINMAXOBJ) $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) install: - mkdir -p $(bindir) - $(INSTALL) open2300 $(bindir) - $(INSTALL) dump2300 $(bindir) - $(INSTALL) log2300 $(bindir) - $(INSTALL) fetch2300 $(bindir) - $(INSTALL) wu2300 $(bindir) - $(INSTALL) cw2300 $(bindir) - $(INSTALL) histlog2300 $(bindir) - $(INSTALL) xml2300 $(bindir) - $(INSTALL) light2300 $(bindir) - $(INSTALL) interval2300 $(bindir) - $(INSTALL) minmax2300 $(bindir) - + ${BSD_INSTALL_PROGRAM} open2300 $(bindir) + ${BSD_INSTALL_PROGRAM} dump2300 $(bindir) + ${BSD_INSTALL_PROGRAM} log2300 $(bindir) + ${BSD_INSTALL_PROGRAM} fetch2300 $(bindir) + ${BSD_INSTALL_PROGRAM} wu2300 $(bindir) + ${BSD_INSTALL_PROGRAM} cw2300 $(bindir) + ${BSD_INSTALL_PROGRAM} histlog2300 $(bindir) + ${BSD_INSTALL_PROGRAM} xml2300 $(bindir) + ${BSD_INSTALL_PROGRAM} light2300 $(bindir) + ${BSD_INSTALL_PROGRAM} interval2300 $(bindir) + ${BSD_INSTALL_PROGRAM} minmax2300 $(bindir) + ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/examples/open2300 + ${BSD_INSTALL_DATA} open2300-dist.conf ${PREFIX}/share/examples/open2300/open2300.conf + +install-mysql: + ${BSD_INSTALL_PROGRAM} mysql2300 $(bindir) + uninstall: rm -f $(bindir)/open2300 $(bindir)/dump2300 $(bindir)/log2300 $(bindir)/fetch2300 $(bindir)/wu2300 $(bindir)/cw2300 $(bindir)/xml2300 $(bindir)/light2300 $(bindir)/interval2300 $(bindir)/minmax2300