From baa04b9406b4c2eb705fadd810d96897eaea5d6f Mon Sep 17 00:00:00 2001 From: mjvk Date: Sat, 12 Oct 2019 17:48:23 +0200 Subject: [PATCH] Add QNX x86_64 support (#2) * Adds QNX x86_64 support pthread is included in libc for QNX, so moved that to system- specific parts of the makefiles. * Updates description of makefile --- makefiles/Makefile.common | 2 +- makefiles/Makefile.hpux | 2 +- makefiles/Makefile.iphone | 2 +- makefiles/Makefile.linux | 2 +- makefiles/Makefile.macosx | 2 +- makefiles/Makefile.mklinux | 2 +- makefiles/Makefile.netbsd | 2 +- makefiles/Makefile.sgi | 2 +- makefiles/Makefile.solaris | 2 +- makefiles/Makefile.x86_64-qnx | 47 +++++++++++++++++++++++++++++++++++ 10 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 makefiles/Makefile.x86_64-qnx diff --git a/makefiles/Makefile.common b/makefiles/Makefile.common index 5c698d3..704ffb9 100644 --- a/makefiles/Makefile.common +++ b/makefiles/Makefile.common @@ -20,7 +20,7 @@ CFLAGS = -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O $(SYSTEM_CFLAGS) $(SY LDFLAGS = $(SYSTEM_LDFLAGS) # Note: Even command line app needs X11 for Netscape post-processing -LIBS = $(SYSTEM_LIBS) -lm -lpthread +LIBS = $(SYSTEM_LIBS) -lm XLIBS = -lXmu -lXt -lX11 diff --git a/makefiles/Makefile.hpux b/makefiles/Makefile.hpux index 306bea5..19edae7 100644 --- a/makefiles/Makefile.hpux +++ b/makefiles/Makefile.hpux @@ -8,7 +8,7 @@ # SYSTEM_INCLUDES = SYSTEM_LDFLAGS = -SYTSTEM_LIBS = +SYTSTEM_LIBS = -lpthread # 6) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.iphone b/makefiles/Makefile.iphone index d759333..6a699b0 100644 --- a/makefiles/Makefile.iphone +++ b/makefiles/Makefile.iphone @@ -12,7 +12,7 @@ SYSROOT = $(SDK)/SDKs/iPhoneOS2.2.1.sdk SYSTEM_INCLUDES = SYSTEM_LDFLAGS = -L$(SYSROOT)/usr/lib -SYSTEM_LIBS = -lresolv +SYSTEM_LIBS = -lresolv -lpthread # 2) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.linux b/makefiles/Makefile.linux index 9f1e80c..e5a1262 100644 --- a/makefiles/Makefile.linux +++ b/makefiles/Makefile.linux @@ -7,7 +7,7 @@ # SYSTEM_INCLUDES = -Wall -I/usr/X11R6/include SYSTEM_LDFLAGS = -L/usr/X11R6/lib -SYSTEM_LIBS = -ldl +SYSTEM_LIBS = -ldl -lpthread # 6) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.macosx b/makefiles/Makefile.macosx index f8c802e..b0c35b5 100644 --- a/makefiles/Makefile.macosx +++ b/makefiles/Makefile.macosx @@ -8,7 +8,7 @@ SYSTEM_INCLUDES = SYSTEM_LDFLAGS = -SYSTEM_LIBS = -lresolv -lpcap +SYSTEM_LIBS = -lresolv -lpcap -lpthread # 2) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.mklinux b/makefiles/Makefile.mklinux index 210c2fe..02988a7 100644 --- a/makefiles/Makefile.mklinux +++ b/makefiles/Makefile.mklinux @@ -9,7 +9,7 @@ SYSTEM_INCLUDES = -I/usr/X11R6/include SYSTEM_LDFLAGS = -L/usr/X11R6/lib -SYSTEM_LIBS = -ldl +SYSTEM_LIBS = -ldl -lpthread # 6) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.netbsd b/makefiles/Makefile.netbsd index 7038c83..4d81d1b 100644 --- a/makefiles/Makefile.netbsd +++ b/makefiles/Makefile.netbsd @@ -7,7 +7,7 @@ # SYSTEM_INCLUDES = -I/usr/X11R6/include SYSTEM_LDFLAGS = -L/usr/X11R6/lib -SYSTEM_LIBS = +SYSTEM_LIBS = -lpthread # 6) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.sgi b/makefiles/Makefile.sgi index cdf0f53..aefed25 100644 --- a/makefiles/Makefile.sgi +++ b/makefiles/Makefile.sgi @@ -8,7 +8,7 @@ # SYSTEM_INCLUDES = -DIRIX -n32 -woff 3333 SYSTEM_LDFLAGS = -SYSTEM_LIBS = +SYSTEM_LIBS = -lpthread # 6) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.solaris b/makefiles/Makefile.solaris index 79b6918..c920458 100644 --- a/makefiles/Makefile.solaris +++ b/makefiles/Makefile.solaris @@ -7,7 +7,7 @@ # SYSTEM_INCLUDES = SYSTEM_LDFLAGS = -SYSTEM_LIBS = -ldl -lnsl -lsocket -lresolv +SYSTEM_LIBS = -ldl -lnsl -lsocket -lresolv -lpthread # 2) System specific capabilities # Must choose appropriate for the following: diff --git a/makefiles/Makefile.x86_64-qnx b/makefiles/Makefile.x86_64-qnx new file mode 100644 index 0000000..32bd15d --- /dev/null +++ b/makefiles/Makefile.x86_64-qnx @@ -0,0 +1,47 @@ +# +# NORM QNX 7 x86_64 Makefile +# + +# 5) System specific additional libraries, include paths, etc +# (Where to find X11 libraries, etc) +# +SYSTEM_INCLUDES = -I/usr/X11R6/include +SYSTEM_LDFLAGS = -L/usr/X11R6/lib +SYSTEM_LIBS = -lsocket + +# 6) System specific capabilities +# Must choose appropriate for the following: +# +# A) -DHAVE_CUSERID (preferred) or -DHAVE_GETLOGIN for cuserid() or getlogin() +# functions to obtain user's login name (We may change this to getpwd() +# if that is better across different platforms and login environments) +# +# B) -DHAVE_LOCKF (preferred) or -D_LOCKF for lockf() or flock() file locking +# functions to attempt exclusive lock on writing to files +# +# C) Specify -DHAVE_DIRFD if you system provides the "dirfd()" function +# (Most don't have it defined ... but some do) +# +# D) Optionally specify -DHAVE_ASSERT if your system has a built-in ASSERT() +# routine. +# +# F) Some systems (SOLARIS/SUNOS) have a few gotchas which require +# some #ifdefs to avoid compiler warnings ... so you might need +# to specify -DSOLARIS or -DSUNOS depending on your OS. +# +# G) Uncomment this if you have the NRL IPv6+IPsec software +#DNETSEC = -DNETSEC -I/usr/inet6/include +# +# (We export these for other Makefiles as needed) +# + +SYSTEM_HAVES = -DHAVE_GETLOGIN -DHAVE_LOCKF -DHAVE_ASSERT -DHAVE_DIRFD $(DNETSEC) +SYSTEM = x86_64-qnx + +CC = ntox86_64-g++ +SYSTEM_CFLAGS = -fPIC -Wall -pedantic -Wcast-align -Wno-variadic-macros +SYSTEM_SOFLAGS = -shared -Wl,-soname,libnorm.so.1 +RANLIB = ntox86_64-ranlib +AR = ntox86_64-ar + +include Makefile.common