Subject: Re: mopd and byte order
To: Maciej W. Rozycki <macro@ds2.pg.gda.pl>
From: Blaz Zupan <blaz@inlimbo.org>
List: port-pmax
Date: 03/02/2002 23:06:37
Here's the complete "fixed" mopd-make patch, that makes your patched mopd
compile on NetBSD (also with bmake, not only with gmake). In addition to this,
the pf.c patch is needed (sent in my previous mail).
diff -u --recursive --new-file mopd-2.5.3.macro/Makefile mopd-2.5.3/Makefile
--- mopd-2.5.3.macro/Makefile Fri Mar 1 23:28:05 2002
+++ mopd-2.5.3/Makefile Fri Mar 1 23:31:11 2002
@@ -4,6 +4,7 @@
-CFLAGS = -O2 -g
-LDFLAGS =
+CFLAGS = -O2 -g -I/usr/local/include
+LDFLAGS = -L/usr/local/lib
+LIBELF = -lelf
SUBDIRS = common mopd mopchk mopprobe moptrace
@@ -11,6 +12,7 @@
@for dir in $(SUBDIRS); do \
(cd $$dir && \
$(MAKE) "AR=$(AR)" "CC=$(CC)" "RANLIB=$(RANLIB)" \
- "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" $@) || \
+ "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" \
+ "LIBELF=$(LIBELF)" $@) || \
exit 1; \
done
diff -u --recursive --new-file mopd-2.5.3.macro/mopa.out/Makefile mopd-2.5.3/mopa.out/Makefile
--- mopd-2.5.3.macro/mopa.out/Makefile Fri Mar 1 23:28:06 2002
+++ mopd-2.5.3/mopa.out/Makefile Fri Mar 1 23:32:03 2002
@@ -7,7 +7,7 @@
all: $(PROGS)
mopa.out: $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o mopa.out $(OBJS) $(LIBS)
../common/libcommon.a:
cd ../common && $(MAKE) libcommon.a
diff -u --recursive --new-file mopd-2.5.3.macro/mopchk/Makefile mopd-2.5.3/mopchk/Makefile
--- mopd-2.5.3.macro/mopchk/Makefile Fri Mar 1 23:28:45 2002
+++ mopd-2.5.3/mopchk/Makefile Fri Mar 1 23:33:43 2002
@@ -3,12 +3,12 @@
LIBS = ../common/libcommon.a
CPPFLAGS = -I..
-LDADD = -lelf
+LIBELF = -lelf
all: $(PROGS)
mopchk: $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDADD) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o mopchk $(OBJS) $(LIBS) $(LIBELF)
../common/libcommon.a:
cd ../common && $(MAKE) libcommon.a
diff -u --recursive --new-file mopd-2.5.3.macro/mopd/Makefile mopd-2.5.3/mopd/Makefile
--- mopd-2.5.3.macro/mopd/Makefile Fri Mar 1 23:28:45 2002
+++ mopd-2.5.3/mopd/Makefile Fri Mar 1 23:33:55 2002
@@ -8,7 +8,7 @@
all: $(PROGS)
mopd: $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDADD) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o mopd $(OBJS) $(LIBS) $(LDADD)
../common/libcommon.a:
cd ../common && $(MAKE) libcommon.a
diff -u --recursive --new-file mopd-2.5.3.macro/mopprobe/Makefile mopd-2.5.3/mopprobe/Makefile
--- mopd-2.5.3.macro/mopprobe/Makefile Fri Mar 1 23:28:07 2002
+++ mopd-2.5.3/mopprobe/Makefile Fri Mar 1 23:34:07 2002
@@ -7,7 +7,7 @@
all: $(PROGS)
mopprobe: $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o mopprobe $(OBJS) $(LIBS)
../common/libcommon.a:
cd ../common && $(MAKE) libcommon.a
diff -u --recursive --new-file mopd-2.5.3.macro/moptrace/Makefile mopd-2.5.3/moptrace/Makefile
--- mopd-2.5.3.macro/moptrace/Makefile Fri Mar 1 23:28:07 2002
+++ mopd-2.5.3/moptrace/Makefile Fri Mar 1 23:34:20 2002
@@ -7,7 +7,7 @@
all: $(PROGS)
moptrace: $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o moptrace $(OBJS) $(LIBS)
../common/libcommon.a:
cd ../common && $(MAKE) libcommon.a