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
|
BASENAME = basename
/* Hopefully, the following two will work properly if the SunHasACC
* define/undef above is set correctly, so that the user does not
* need to set these manually.
*/
#if defined(SunArchitecture) && (OSMajorVersion != 5) && !defined(SunHasAcc) \
&& !defined(SmartSunHeaders)
#define StupidSunHeaders
#endif
/* Only Suns with acc seem to have problems with longjump */
#ifdef SunHasAcc
#undef NoLongJumps
#endif
#ifdef XPM_PIX
#ifdef Xpm_LibDir
/* Concat(-L,Xpm_LibDir) doesn't work right (At least not on my
* sun 3). Instead of replacing Xpm_LibDir with its defined value,
* it instead becomes -LXpm_LibDir. I don't know if this is because
* the preprocessor used is the one that comes with standard sun
* systems, and thus does not understand something, or if there
* is some other problem. In any case, by doing it with
* the following method, it works, and will hopefully work on
* other systems -- mark@pyramid.com
*/
XPM_LIBDIR = -L/**/Xpm_LibDir
#endif
#ifdef Xpm_Include
XPM_DEFINES = -DXpm_Pix -I/**/Xpm_Include
#else
XPM_DEFINES = -DXpm_Pix
#endif
XPM_LIBS = $(XPM_LIBDIR) -lXpm
#endif
/* This is just needed to handle a bug in the sun 3 linker when linking
* statically with X11 libraries
*/
#if defined(SunArchitecture) && ! defined(SparcArchitecture)
DLSYM = /usr/lib/dlsym.o
#endif
#ifdef Use_Dmalloc
DMALLOC_DEFINE = -DDMALLOC
DMALLOC_LIB = -ldmalloc
#endif
/*
* InsertArchive(files,dir) - put files into packet tree into dir
* PackArchive(name) - pack packet tree name
* MakeArchive(dirs) - archie in subdirs also
* InstallPerl(program,dest) - intall perl (*.pl) script
*/
/**********************************************************************
* Archive rules
* - set $(ATOP) before use, e.g. ATOP = /tmp/xyzzy (see PackArchive)
**********************************************************************/
/*
* InsertArchive - insert files to specified dir under ATOP, use this
* in Imakefiles in all directories
* - copy files to temporary directory, symbolic link are so get rig off
*/
#ifndef InsertArchive
#define InsertArchive(files,dir) @@\
subarchive:: @@\
MakeDir($(ATOP)/dir) @@\
$(CP) files $(ATOP)/dir
#endif
/*
* PackArchive - ,use this in Imakefile in main directory
*/
#ifndef PackArchive
#define PackArchive(name) @@\
ATOP = /tmp/name @@\
TAR = gtar @@\
archive: subarchive @@\
$(RM) name.tar.Z @@\
(cd $(ATOP);cd ..;\ @@\
$(RM) name.tar name.tar.Z;\ @@\
$(TAR) cvfhz name.tar.gz `$(BASENAME) $(ATOP)`;\ @@\
/* $(COMPRESS) name.tar*/) @@\
$(MV) $(ATOP)/../name.tar.gz . @@\
$(RM) -r $(ATOP)
#endif
/*
* PackShar - use this in Imakefile in main directory
*/
#ifndef PackShar
#define PackShar(version,name,me) @@\
shar: subarchive @@\
$(RM) name.version.shar.* @@\
(cd $(ATOP); cd ..;\ @@\
$(RM) name.tar name.tar.Z;\ @@\
find . -type f -print | sort | shar -S -a -s me -c -o name.version.shar -L50) @@\
$(MV) $(ATOP)/../name.version.shar* . @@\
$(RM) -r $(ATOP)
#endif
/*
* MakeArchive - declare here subdirs to be archived, use this in
* imake files in all directories
*/
#ifndef MakeArchive
#define MakeArchive(dirs) @@\
NamedTargetSubdirs(subarchive,dirs,"archiving",'ATOP=$(ATOP)',subarchive)
#endif
/*
* Leave CDebug uncommented if you only want to play, not debug.
*/
#ifdef CDebug
#ifdef HasGcc
/* Gcc is nice. Lets us use both the -g and -O flags
*/
DEBUGFLAGS = -g -DDEBUG -O /* define if you want to get useful corefiles */
#else
DEBUGFLAGS = -g -DDEBUG /* define if you want to get useful corefiles */
#endif
#endif
#ifdef CProf
#ifdef HPArchitecture
DEBUGFLAGS = -g -DDEBUG -p -y /* For studying performance with prof */
#else
DEBUGFLAGS = -static -g -DDEBUG -pg -O /* For studying performance with prof */
#endif
#endif
/* Use this, since CDEBUGFLAGS will be used in both the link
* and normal compile phase.
*/
CDEBUGFLAGS = $(DEBUGFLAGS) $(EXTRA_FLAGS)
#ifndef NoLongJumps
NOLONGJUMPS = -DLONGJUMP
#endif
#ifdef StupidSunHeaders
STUPIDSUNHEADERS = -DStupidSunHeaders
#endif
#ifdef Extra_Flags
EXTRA_FLAGS = Extra_Flags
#endif
EXTRA_DEFINES = $(NOLONGJUMPS) $(STUPIDSUNHEADERS) $(XPM_DEFINES) \
$(MALLOC_DEFINES) $(DMALLOC_DEFINE) -DCFCLIENT
#ifdef ForceCCOPTIONS
CCOPTIONS = ForceCCOPTIONS /* Some compilers don't like the default -pipe */
#endif
/*
* Which compiler to use. It must be able to handle ANSI-C. gcc -ansi is OK.
* On anything except sun and hp, the lines should ideally stay commented out.
*/
#ifndef ForceCC
#if defined(SunArchitecture)
#ifdef SunHasAcc
CC = acc
CCOPTIONS = -Xc
#else /* Suns or other systems without ANSI-C */
CC = gcc -ansi -Wall
#endif
#endif
#ifdef HPArchitecture
CC = cc /* cc on HP-UX, use xmkmf.ansi */
#if defined (CProf) || defined (CDebug)
CCOPTIONS = -Aa -D_HPUX_SOURCE /* cpp.ansi barfs on -Wp,200000 */
#else
CCOPTIONS = -Aa -D_HPUX_SOURCE +O3 +OS /* cpp.ansi barfs on -Wp,200000 */
#endif
#endif
#ifdef MipsArchitecture
/* CC = cc -Olimit 1000 /* Decstations: -Olimit 1000 is useful */
CC = cc -ansi -Dmips -DDMIPS /* const usage in X11R5 xtoolkits. */
#endif /* This only affects crossedit, so if you */
/* use /bin/cc you will be able to compile */
/* crossfire itself. */
#ifdef AlphaArchitecture
CC = cc -std1 -Olimit 1000 /* Alpha */
#endif
#ifdef NeXTArchitecture
CC = cc -DNeXT -DBSD
#endif
/*
* #ifdef RsArchitecture
* CC = cc -D__STDC___
* #endif
*/
#ifdef AIXArchitecture
CC = cc -I./
#endif
#ifdef SGIArchitecture
CC = cc -ansi
#endif
#else /* ForceCC is set */
CC = ForceCC
#endif
#ifdef HPArchitecture
TARGET = -Dhpux
#endif
#ifdef SGIArchitecture
TARGET = -Dsgi
#endif
#ifdef OSFArchitecture
LOCAL_LIBRARIES = $(LOCAL_LIBRARIES) -lbsd
TARGET = -Dosf1
#endif
|