summaryrefslogtreecommitdiff
path: root/xc/config/cf/os2.cf
blob: 1d8ac4ba109fc5e8508f964c8385cc950a793129 (plain)
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
XCOMM $TOG: os2.cf /main/2 1997/08/05 08:51:25 kaleb $



XCOMM platform:  $XFree86: xc/config/cf/os2.cf,v 3.30 2000/07/07 20:06:56 tsi Exp $

#define OSName           OS/2
#define OSVendor	 IBM
#define OSMajorVersion    4
#define OSMinorVersion    0

/*
 * C library features
 */
#ifdef __EMX__

/* set this to what you like (almost :-) 
 * OS/2 does a nonstandard bootstrap of imake 
 */
#define BootstrapCFlags   -DBSD43

#define StandardDefines   -DX_LOCALE -DX_WCHAR
#define XawI18nDefines    -DUSE_XWCHAR_STRING -DUSE_XMBTOWC

/* This will redirect everything to /XFree86
 * Care will be taken that programs that need a file from this tree
 * will add the environment variable X11ROOT to the search path
 * so you can redirect the stuff to a different drive
 */
#ifdef ProjectRoot
#undef ProjectRoot
#endif
/* This will be mangled with a drive letter in most OS/2 rules ... */
#define ProjectRoot	/XFree86

/* ... but not when a user tries to compile something from a different drive 
 * Please report any directories missed to Holger.Veit@gmd.de 
*/
#ifdef UseInstalled
/*#define IncRoot $(X11ROOT)/XFree86/include*/
#define ConfigDir $(X11ROOT)$(LIBDIR)/config
#define LdPreLib -L$(X11ROOT)/XFree86/lib
#endif

/* more directories */
#define AdmDir		        $(LIBDIR)/adm
        DESTDIR = $(X11ROOT)

/* for the man pages */
#define BookFormatManPages	YES
#define ManDirectoryRoot /XFree86/man/man
#define ManSuffix	1
#define LibManSuffix	3
#define FileManSuffix	4
#define XmanSearchPath	/XFree86/man/man
#define ManSourcePath	$(MANPATH)
#define DontUseLibPAthVar YES

/* you must have installed groff! */
#define TblCmd		tbl
#define ColCmd		cat
#define NeqnCmd		eqn 
#define NroffCmd	groff -Tascii
#define	EqnCmd 		eqn -Tascii
#define TroffCmd        groff -Tps
         NEQN = NeqnCmd
        NROFF = NroffCmd

/* A set of standard defines: */
#define OSDefines		-D__EMX__ -D__i386__ -Demxos2 -D_POSIX_SOURCE \
				-D_BSD_SOURCE -D_GNU_SOURCE

#ifndef BuildXKB
#define BuildXKB		YES
#endif
#define BuildImplibs		YES
#ifndef BuildLBX
#define BuildLBX		YES
#endif
#ifndef DoLoadableServer
#define DoLoadableServer        YES
#endif
#undef MakeDLLModules
#define MakeDLLModules          NO


/* some more properties of the OS/2 implementation */
#define HasNdbm         	YES
#define HasPutenv       	YES
#define HasSockets		YES
#define HasSnprintf		YES
#define HasBsearch		NO
#define HasFchown		NO
#define HasLargeTmp		NO
#define HasPoll			NO
#define HasBSD44Sockets 	NO
#define HasSecureRPC		NO
#define	HasSymLinks		NO
#define HasVFork		NO
#define HasVarDirectory		NO
#define HasStrcasecmp		NO
#define StrcasecmpDefines	-DNEED_STRCASECMP -Dstrcasecmp=stricmp -Dstrncasecmp=strnicmp
#define Malloc0ReturnsNull	YES
#define SetTtyGroup     	NO
#ifndef HasLibCrypt
# define HasLibCrypt		NO
#endif
#ifndef HasShm
# define HasShm          	YES
#endif
#define ConnectionFlags		-DTCPCONN -DOS2PIPECONN
#define StdIncDir $(C_INCLUDE_PATH)
#define HasStickyDirBit		NO
#define HasMkstemp		NO

/* XF86Setup stuff - does not work yet! */
#define HasTcl			NO
/*define TclLibDir		$(X11ROOT)$(SHLIBDIR)*/
/*define TclIncDir		$(X11ROOT)$(INCROOT)/tcl*/
/*define TclLibName		xtcl*/

#define HasTk			NO
/*define TkLibDir		$(X11ROOT)$(SHLIBDIR)*/
/*define TkIncDir		$(X11ROOT)$(INCROOT)/tk*/
/*define TkLibName		xtk*/

/*
 * Compiler Features
 */
#define HasCplusplus		YES
#define GccUsesGas		YES
#define UseGas			YES
#define GnuCpp			YES
#define DoRanlibCmd		YES
#define NeedConstPrototypes	YES
#define NeedFunctionPrototypes	YES
#define NeedNestedPrototypes	YES
#define NeedVarargsPrototypes	YES
#define NeedWidePrototypes	NO

#define CppCmd	cpp
#define StandardCppOptions	-traditional
#define StandardCppDefines	/**/
#define PreProcessCmd	CppCmd

#define CcCmd	gcc
#define DefaultCCOptions	-D__ST_MT_ERRNO -Zmtd -Zsysv-signals
#define LibraryCCOptions	-D__ST_MT_ERRNO -Zmtd -Zsysv-signals
#define ServerCCOptions		-D__ST_MT_ERRNO  -Zmtd -Zsysv-signals

#define ModuleCcCmd		gcc_elf
#define ModuleCppCmd		cpp_elf
#define ModuleCFlags $(CDEBUGFLAGS) $(THREAD_CFLAGS) $(ALLDEFINES)
#define ModuleAsCmd		as_elf
#define ModuleLdCmd		ld_elf
#define ModuleLdCombineFlags	-X -r
#define ModuleArCmd		ar_elf cq 
#define NeedModuleRanlib	YES
#define ModuleRanlibCmd		ranlib_elf

#define CplusplusCmd	g++
#define CplusplusOptions	-Zmtd -Zsysv-signals

#define MakeCmd x11make 
#define AsCmd	gcc -S
#define GccGasOption	-DGCCUSESGAS
#define AsmDefines	-DUSE_GAS

#define InstallCmd	install

#define LdCmd	ld
#define ExtraLoadFlags	-Zbin-files
#define ExtraLibraries	-lsocket -lbsd
#if HasShm
# define ServerExtraSysLibs     -lregex -lshm
#endif

/* quite a number of programs you need, most of them the same as
 * with Unix, but listed here for completeness
 */
#define ArCmd	ar cq
#define RanlibCmd	ar s
#define BourneShell	/**/
#define LexCmd	flex -l
#define LexLib	-lfl
#define YaccCmd	yacc
#define LintCmd	/**/
#define MvCmd	mv
#define CompressCmd	compress
#define GzipCmd	gzip
#define LnCmd cp
#define CpCmd cp
#define RmCmd	ImakeHelper 4 

#ifndef UseInstalled
#define ImakeCmd \imake
#define MkdirHierCmd \mkdirhier
#define DependCmd \makedepend
#else
/* imake and mkdirhier come from Imake.tmpl, but DependCmd must be overriden */
#define DependCmd makedepend
#endif

/* "shell scripts" in OS/2 have this extension */
#define SHsuf cmd

#define InstPgmFlags /**/
#define InstBinFlags /**/
#define InstUidFlags /**/
#define InstLibFlags /**/
#define InstIncFlags /**/
#define InstManFlags /**/
#define InstDatFlags /**/
#define InstallFlags /**/

#define OptimizedCDebugFlags 	DefaultGcc2i386Opt
#define ServerOSDefines		XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
#define ServerExtraDefines	GccGasOption XFree86ServerDefines

/*
 * Make & install Features
 */

#define AvoidNullMakeCommand 	YES
_NULLCMD_ = @ rem
#define NullMakeCommand	@ rem
#define StripInstalledPrograms	NO
#define CompressAllFonts	YES
#define CompressManPages	YES
#define GzipFontCompression	YES
#define DefaultUserPath		.;/os2;/emx/bin;/tcpip/bin;$(BINDIR)
#define DefaultSystemPath	/os2;/emx/bin;$(BINDIR)

#ifndef ExtraFilesToClean
# define ExtraFilesToClean 	*.~* *.exe *.dll *.obj *.lib *.map
#endif

#if CompressManPages
#define CompressManCmd	gzip -n
   COMPRESSMANCMD = CompressManCmd
#endif

#define ProgramTargetName(target)target.exe

/* we don't name libraries lib*.a */
#define LibraryTargetName(libname) libname.a
#define LibraryTargetNameSuffix(libname,suffix)Concat(libname,suffix.a)

/* ... and we even don't do it in rules that should have used the above
 * LibraryTargetName macro
 */
#ifndef UnSharedLibReferences
#define UnsharedLibReferences(varname,libname,libsource)		@@\
Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,$(BUILDLIBDIR)/,libname.a)	@@\
Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)		@@\
LintLibReferences(varname,libname,libsource)
#endif

#ifndef SharedLibReferences
#define SharedLibReferences(varname,libname,libsource,revname,rev)	@@\
Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)		@@\
LintLibReferences(varname,libname,libsource)
#endif

#define XFileSearchPathBase Concat4($(LIBDIR)/;L/;T/;N;C,;S:$(LIBDIR)/;l/;T/;N;C,;S:$(LIBDIR)/;T/;N;C,;S:$(LIBDIR)/;L/;T/;N;S:$(LIBDIR)/;l/;T/;N;S:$(LIBDIR)/;T/;N;S)


#include <os2.rules>
#include <os2Lib.rules>

# include <xfree86.cf>

#else
#error You must edit os2.cf for your (non-EMX) OS/2 dev system
#endif