ports/sysutils/monitord/files/patch-Makefile
Stefan Eßer e3f400194b Fix build with -fno-common
While here simplify the port's Makefile and fix the wrong usage of bzero
and other library functions that take a buffer size: The size parameter
passed was always the pointer, not the buffer pointed to, i.e.
"bzero(buf, sizeof(buf)" instead of "bzero(buf, sizeof(*buf)" ...
2020-09-04 12:05:45 +00:00

33 lines
761 B
Text

--- Makefile.orig 2003-08-21 22:36:42 UTC
+++ Makefile
@@ -6,14 +6,14 @@ OBJECTS = monitord.o mail.o
TARGET = monitord
-MANDIR = /usr/local/man
+MANDIR = $(PREFIX)/man
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
- $(CC) $(CFLAGS) -c -pipe -Wall $<
+ $(CC) $(CFLAGS) -c -Wall $<
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -o $(TARGET)
@@ -24,10 +24,8 @@ clean:
all: $(TARGET)
-$(TARGET): $(OBJECTS)
- $(CC) $(OBJECTS) -o $(TARGET)
install:
- $(INSTALL) -cs $(TARGET) /usr/local/sbin
- $(INSTALL) -c $(TARGET).conf.sample /usr/local/etc
- $(INSTALL) -c $(TARGET).8 $(MANDIR)/man8
+ $(INSTALL) -cs $(TARGET) $(DESTDIR)$(PREFIX)/sbin
+ $(INSTALL) -c $(TARGET).conf.sample $(DESTDIR)$(PREFIX)/etc
+ $(INSTALL) -c $(TARGET).8 $(DESTDIR)$(MANDIR)/man8