2005-12-20 20:32:28 -05:00
|
|
|
$OpenBSD: patch-makefile,v 1.9 2005/12/21 01:32:29 fgsch Exp $
|
2005-06-18 23:47:25 -04:00
|
|
|
--- makefile.orig Thu Apr 7 16:56:36 2005
|
|
|
|
+++ makefile Sat Jun 18 03:49:17 2005
|
|
|
|
@@ -3,28 +3,29 @@
|
2003-02-02 15:24:47 -05:00
|
|
|
# Note: -O2 is sometimes broken in GCC when setjump/longjump is being
|
|
|
|
# used. Try -O2 only with released simulators.
|
|
|
|
#
|
|
|
|
-ifeq ($(WIN32),)
|
|
|
|
+#ifeq ($(WIN32),)
|
|
|
|
#Unix Environments
|
2005-06-18 23:47:25 -04:00
|
|
|
-ifeq ($(OSTYPE),solaris)
|
|
|
|
-OS_CCDEFS = -lsocket -lnsl -lpthread -D_GNU_SOURCE
|
2003-02-02 15:24:47 -05:00
|
|
|
-else
|
2005-06-18 23:47:25 -04:00
|
|
|
-OS_CCDEFS = -D_GNU_SOURCE
|
|
|
|
-endif
|
|
|
|
+#ifeq ($(OSTYPE),solaris)
|
|
|
|
+#OS_CCDEFS = -lsocket -lnsl -lpthread -D_GNU_SOURCE
|
2003-02-02 15:24:47 -05:00
|
|
|
+#else
|
2005-06-18 23:47:25 -04:00
|
|
|
+OS_CCDEFS = -D_GNU_SOURCE ${CFLAGS}
|
|
|
|
+#endif
|
|
|
|
CC = gcc -std=c99 -O2 -U__STRICT_ANSI__ -g -lm $(OS_CCDEFS) -I .
|
|
|
|
-ifeq ($(USE_NETWORK),)
|
|
|
|
-else
|
|
|
|
-NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a
|
2003-02-02 15:24:47 -05:00
|
|
|
-endif
|
|
|
|
-else
|
2005-06-18 23:47:25 -04:00
|
|
|
+#ifeq ($(USE_NETWORK),)
|
|
|
|
+#else
|
|
|
|
+#NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a
|
2005-12-20 20:32:28 -05:00
|
|
|
+NETWORK_OPT = -DUSE_NETWORK -DNEED_PCAP_SENDPACKET -lpcap
|
2003-02-02 15:24:47 -05:00
|
|
|
+#endif
|
|
|
|
+#else
|
|
|
|
#Win32 Environments
|
|
|
|
-LDFLAGS = -lm -lwsock32
|
2005-06-18 23:47:25 -04:00
|
|
|
-CC = gcc -std=c99 -U__STRICT_ANSI__ -O0 -I.
|
2003-02-02 15:24:47 -05:00
|
|
|
-EXE = .exe
|
|
|
|
-ifeq ($(USE_NETWORK),)
|
|
|
|
-else
|
|
|
|
-NETWORK_OPT = -DUSE_NETWORK -lwpcap -lpacket
|
|
|
|
-endif
|
|
|
|
-endif
|
|
|
|
+#LDFLAGS = -lm -lwsock32
|
2005-06-18 23:47:25 -04:00
|
|
|
+#CC = gcc -std=c99 -U__STRICT_ANSI__ -O0 -I.
|
2003-02-02 15:24:47 -05:00
|
|
|
+#EXE = .exe
|
|
|
|
+#ifeq ($(USE_NETWORK),)
|
|
|
|
+#else
|
|
|
|
+#NETWORK_OPT = -DUSE_NETWORK -lwpcap -lpacket
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2005-06-18 23:47:25 -04:00
|
|
|
@@ -253,11 +254,11 @@ ALL = ${BIN}pdp1${EXE} ${BIN}pdp4${EXE}
|
2003-05-28 12:31:07 -04:00
|
|
|
all : ${ALL}
|
|
|
|
|
|
|
|
clean :
|
|
|
|
-ifeq ($(WIN32),)
|
|
|
|
+#ifeq ($(WIN32),)
|
|
|
|
${RM} ${ALL}
|
|
|
|
-else
|
|
|
|
- if exist BIN\*.exe del /q BIN\*.exe
|
|
|
|
-endif
|
|
|
|
+#else
|
|
|
|
+# if exist BIN\*.exe del /q BIN\*.exe
|
|
|
|
+#endif
|
|
|
|
#
|
2003-02-02 15:24:47 -05:00
|
|
|
# Individual builds
|
|
|
|
#
|