/usr/share/aolserver4/ns.mak is in aolserver4-dev 4.5.1-15.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | #
# The contents of this file are subject to the AOLserver Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://aolserver.com/.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is AOLserver Code and related documentation
# distributed by AOL.
#
# The Initial Developer of the Original Code is America Online,
# Inc. Portions created by AOL are Copyright (C) 1999 America Online,
# Inc. All Rights Reserved.
#
# Alternatively, the contents of this file may be used under the terms
# of the GNU General Public License (the "GPL"), in which case the
# provisions of GPL are applicable instead of those above. If you wish
# to allow use of your version of this file only under the terms of the
# GPL and not to allow others to use your version of this file under the
# License, indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by the GPL.
# If you do not delete the provisions above, a recipient may use your
# version of this file under either the License or the GPL.
#
#
# $Header: /cvsroot/aolserver/aolserver/include/ns.mak.in,v 1.5 2006/06/27 17:00:55 jgdavidson Exp $
#
# ns.mak.in --
#
# Makefile include for AOLserver modules, libraries, and programs. Variables to set
# before including this file include:
#
# AOLSERVER AOLserver install directory
# DLL Root name of dynamic library (without lib prefix or extension)
# OBJS List of library object files (required with DLL)
# DLLINIT Dynamic library entry point
# DLLLIBS Extra dynamic library link libraries
# MOD Name of module
# MODOBJS List of module object files (required with MOD)
# MODINIT Module entry point
# MODLIBS Extra module link libraries
# PGM Name of executable program
# PGMOBJS List of program object files (required with PGM)
# PGMLIBS Extra program link libraries
# HDRS Header files which objects depend on
# INSTALL Extra install directive(s)
# CLEAN Extra clean directive(s)
#
# At least one of PGM, MOD, or DLL must be defined.
#
# See ../nsd/Makefile and ../nsdb/Makefile for examples.
#
#
# Install directories.
#
AOLSERVER = /usr/lib/aolserver4
TCLSH = /usr/bin/tclsh
INSTBIN = $(AOLSERVER)/bin
INSTLIB = $(AOLSERVER)/lib
INSTINC = $(AOLSERVER)/include
INSTTCL = $(AOLSERVER)/modules/tcl
INSTSRV = $(AOLSERVER)/servers/server1
INSTSRVMOD = $(INSTSRV)/modules
INSTSRVPAG = $(INSTSRV)/pages
SH = /bin/sh
DEBRPATH = -Wl,-rpath,$(INSTLIB)
#
# Compiler and linker options.
#
LIBEXT = .so
LDLIB = ${CC} -shared ${CFLAGS} ${LDFLAGS} -nostartfiles
LDSO = $(LDLIB) $(DEBRPATH)
CCRFLAG =
LDRFLAG =
CCRPATH += $(DEBRPATH)
LDRPATH += $(DEBRPATH)
CC = $(PURIFY) x86_64-linux-gnu-gcc
CFLAGS_DEBUG = -g
CFLAGS_OPTIMIZE = -O2
CFLAGS_WARNING = -Wall
CFLAGS_INCLUDE = -I$(INCDIR) -I/usr/include/tcl8.5
CFLAGS_EXTRA = -fPIC -g -O2 -fno-unit-at-a-time -pipe
DEFS = -DNO_CONST -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_GETATTR_NP=1 -DGETATTRNP_NOT_DECLARED=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_BLKCNT_T=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_TIMEGM=1 -DHAVE_DRAND48=1 -DHAVE_RANDOM=1 -DHAVE_POLL=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1
CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) $(DEFS)
ifndef SRCDIR
UTILS = /usr/share/aolserver4
LIBS += -L/usr/lib/aolserver4/lib -lnsd -lnsthread
INCDIR = /usr/include/aolserver4
else
UTILS = $(SRCDIR)/util
INCDIR = $(SRCDIR)/include
ifneq (nsthread,$(DLL))
ifneq (nsd,$(DLL))
ifneq (nsthreadtest,$(PGM))
LIBS += -L$(SRCDIR)/nsd -lnsd
endif
endif
LIBS += -L$(SRCDIR)/nsthread -lnsthread
endif
endif
LIBS += -L/usr/lib -ltcl8.5 -ldl -lpthread -lieee -lm -Wl,-Bsymbolic-functions -lgcc_s
CCLIBS = $(LIBS) -Wl,-Bsymbolic-functions -Wl,--export-dynamic
#
# Shell utilities.
#
RANLIB = ranlib
MAKEALL = $(TCLSH) $(UTILS)/nsmakeall.tcl
RM = $(TCLSH) $(UTILS)/nsremove.tcl
INST = $(TCLSH) $(UTILS)/nsinstall.tcl
INSTMAN = $(SH) $(UTILS)/nsinstall-man.sh -v -s
INSTALL_SH = $(UTILS)/install-sh -c
INSTALL_DATA = $(INSTALL_SH) -m 644
#
# Platform-specific options.
#
uname = $(shell uname -a)
# Solaris 2.6+
ifneq (,$(findstring SunOS,$(uname)))
ifneq (,$(findstring 5.6,$(uname)))
LIBS+=-lthread -lposix4
else
LIBS+=-lrt
endif
endif
# Mac OS X
ifneq (,$(findstring Darwin,$(uname)))
LDFLAGS += -g -O2 -fno-unit-at-a-time -pipe
endif
# Add dynamic library entry point flags.
ifdef DLLINIT
ifneq (,$(findstring Darwin,$(uname)))
INIT = _$(DLLINIT)
LDLIB += -init _$(INIT)
else
INIT = _init
endif
endif
ifdef MOD
DLL = $(MOD)
MODBIN = $(MOD).so
BUILD += $(MODBIN)
INSTALL += install-mod
CLEAN += clean-mod
ifdef MODINIT
MODSRC = $(INCDIR)/nsmodinit.c
MODOBJ = $(MOD)_modinit.o
MODOBJS += $(MODOBJ)
endif
endif
ifdef DLL
DLLBIN = lib$(DLL)$(LIBEXT)
DLLLIB = lib$(DLL).a
OBJS += $(UNIXOBJS)
ifdef DLLINIT
LIBSRC = $(INCDIR)/nslibinit.c
LIBOBJ = $(DLL)_libinit.o
endif
BUILD += $(DLLLIB) $(DLLBIN)
INSTALL += install-dll
CLEAN += clean-dll
MODLIBS += -L. -l$(DLL)
PGMLIBS += -L. -l$(DLL)
endif
ifdef PGM
BUILD += $(PGM)
INSTALL += install-pgm
CLEAN += clean-pgm
endif
ifdef MAN
INSTALL += install-man install-html
endif
all build: $(BUILD)
install: $(INSTALL)
clean: $(CLEAN)
$(DLLBIN): $(OBJS) $(LIBOBJ)
$(RM) $(DLLBIN)
$(LDLIB) $(LDFLAGS) -o $(DLLBIN) $(OBJS) $(LIBOBJ) \
$(DLLLIBS) $(LIBS) $(LDRPATH) $(DEBRPATH)
$(DLLLIB): $(OBJS)
$(AR) rv $(DLLLIB) $(OBJS)
$(RANLIB) $(DLLLIB)
$(MODBIN): $(MODOBJS) $(DLLBIN)
$(RM) $(MODBIN)
$(LDSO) $(LDFLAGS) -o $(MODBIN) $(MODOBJS) $(MODLIBS) $(LIBS) $(LDRPATH) $(DEBRPATH)
$(MODOBJ): $(MODSRC)
$(CC) $(CFLAGS) -DNS_MODINIT=$(MODINIT) -c -o $(MODOBJ) $(MODSRC)
$(LIBOBJ): $(LIBSRC)
$(CC) $(CFLAGS) -DNS_INIT=$(INIT) -DNS_LIBINIT=$(DLLINIT) -c -o $(LIBOBJ) $(LIBSRC)
$(PGM): $(PGMOBJS) $(DLLLIB) $(DLLBIN)
$(RM) $(PGM)
$(CC) $(LDFLAGS) -o $(PGM) $(PGMOBJS) \
$(PGMLIBS) $(CCLIBS) $(CCRPATH) $(DEBRPATH)
$(MODOBJS) $(OBJS) $(PGMOBJS): $(HDRS) $(INCDIR)/ns.h $(INCDIR)/nsthread.h
install-mod: $(MODBIN)
$(INST) -d $(INSTBIN) -e $(MODBIN)
install-dll: $(DLLBIN)
$(INST) -d $(INSTLIB) -e $(DLLBIN)
$(INST) -d $(INSTLIB) $(DLLLIB)
$(RANLIB) $(INSTLIB)/$(DLLLIB)
install-pgm: $(PGM)
$(INST) -d $(INSTBIN) -e $(PGM)
install-man:
for i in $(MAN); do \
$(INSTMAN) $$i $(AOLSERVER)/man; \
done
install-html:
for i in $(MAN); do \
$(INSTMAN) -h $$i $(AOLSERVER)/html; \
done
clean-mod:
$(RM) $(MODBIN) $(MODOBJS)
clean-dll:
$(RM) $(DLLBIN) $(DLLLIB) $(OBJS) $(LIBOBJ)
clean-pgm:
$(RM) $(PGM) $(PGMOBJS)
.PHONY: clean-mod clean-dll clean-pgm install-man1 install-man3 install-mann
|