FreeBSD 10 clang port
This commit is contained in:
committed by
Jon Trulson
parent
8d0551bfda
commit
c3f74eec17
@@ -40,26 +40,26 @@ XCOMM $TOG: DtInfo.rules /main/21 1997/09/05 11:31:01 samborn $
|
||||
# define makelibT(libname) @@\
|
||||
makelib(libname) @@\
|
||||
@@\
|
||||
libname/lib/**/libname/**/T.a: FRC @@\
|
||||
Concat3(libname/lib,libname,T.a): FRC @@\
|
||||
@(cd libname ; \ @@\
|
||||
echo "### Making lib libname Templates ###" ; \ @@\
|
||||
$(MAKE) lib/**/libname/**/T.a ; \ @@\
|
||||
echo STR(*** Making lib libname Templates ***) ; \ @@\
|
||||
$(MAKE) Concat3(lib,libname,T.a) ; \ @@\
|
||||
)
|
||||
|
||||
# define makelibsubsubdir(subdir,libname) @@\
|
||||
@@\
|
||||
subdir/libname/lib/**/libname.a: FRC @@\
|
||||
Concat(subdir/libname/lib,libname.a): FRC @@\
|
||||
@(cd subdir ; \ @@\
|
||||
echo "### Making lib libname ###" ; \ @@\
|
||||
$(MAKE) libname/lib/**/libname.a ; \ @@\
|
||||
echo STR(*** Making lib libname ***) ; \ @@\
|
||||
$(MAKE) Concat(libname/lib,libname.a) ; \ @@\
|
||||
)
|
||||
|
||||
# define makelibTsubsubdir(subdir,libname) @@\
|
||||
@@\
|
||||
subdir/libname/lib/**/libname/**/T.a: FRC @@\
|
||||
Concat3(subdir/libname/lib,libname,T.a): FRC @@\
|
||||
@(cd subdir ; \ @@\
|
||||
echo "### Making lib libname Templates ###" ; \ @@\
|
||||
$(MAKE) libname/lib/**/libname/**/T.a ; \ @@\
|
||||
echo STR(*** Making lib libname Templates ***) ; \ @@\
|
||||
$(MAKE) Concat3(libname/lib,libname,T.a) ; \ @@\
|
||||
)
|
||||
#else /* not defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3 */
|
||||
# define makelibT(libname) @@\
|
||||
@@ -70,28 +70,28 @@ subdir/libname/lib/**/libname/**/T.a: FRC @@\
|
||||
makelibd(libname,)
|
||||
|
||||
#define makelibd(libname, deps) @@\
|
||||
libname/lib/**/libname.a: deps FRC @@\
|
||||
Concat(libname/lib,libname.a): deps FRC @@\
|
||||
@(cd libname; \ @@\
|
||||
echo "### Making lib libname ###" ; \ @@\
|
||||
$(MAKE) lib/**/libname.a ; \ @@\
|
||||
if [ -d "$(TEMPLATE_DB)" ]; then \ @@\
|
||||
$(MAKE) lib/**/libname/**/T.a ; \ @@\
|
||||
fi \ @@\
|
||||
echo STR(*** Making lib libname ***) ; \ @@\
|
||||
$(MAKE) Concat(lib,libname.a) ; \ @@\
|
||||
if [ -d "$(TEMPLATE_DB)" ]; then \ @@\
|
||||
$(MAKE) Concat3(lib,libname,T.a) ; \ @@\
|
||||
fi \ @@\
|
||||
) @@\
|
||||
libname/libname.d: libname/Classlist.mk @@\
|
||||
@(cd libname; \ @@\
|
||||
echo "### Making dfiles in libname ###" ; \ @@\
|
||||
$(MAKE) libname.d ;\ @@\
|
||||
echo STR(*** Making dfiles in libname ***) ; \ @@\
|
||||
$(MAKE) libname.d ;\ @@\
|
||||
) @@\
|
||||
libname/libname.h: libname/Classlist.mk @@\
|
||||
@(cd libname; \ @@\
|
||||
echo "### Making dfiles in libname ###" ; \ @@\
|
||||
$(MAKE) libname.h ;\ @@\
|
||||
echo STR(*** Making dfiles in libname ***) ; \ @@\
|
||||
$(MAKE) libname.h ;\ @@\
|
||||
) @@\
|
||||
libname/libname.msg: libname/Classlist.mk @@\
|
||||
@(cd libname; \ @@\
|
||||
echo "### Making msgs in libname ###" ; \ @@\
|
||||
$(MAKE) libname.msg ;\ @@\
|
||||
echo STR(*** Making msgs in libname ***) ; \ @@\
|
||||
$(MAKE) libname.msg ;\ @@\
|
||||
) @@\
|
||||
@@\
|
||||
FRC: @@\
|
||||
@@ -149,7 +149,7 @@ AllTarget(Concat(lib,libname.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname.a): objlist @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making SimpleLibrary libname.a" @@\
|
||||
@echo STR(*** Making SimpleLibrary libname.a) @@\
|
||||
$(LD) -r -o $@ objlist
|
||||
|
||||
|
||||
@@ -157,11 +157,11 @@ Concat(lib,libname.a): objlist @@\
|
||||
#define SimpleLibraryT(libname,objlist,libdir) @@\
|
||||
SimpleLibrary(libname,objlist,libdir) @@\
|
||||
@@\
|
||||
AllTarget(Concat(lib,libname/**/T.a)) @@\
|
||||
AllTarget(Concat3(lib,libname,T.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname/**/T.a): @@\
|
||||
Concat3(lib,libname,T.a): @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making SimpleLibraryT libname Templates" @@\
|
||||
@echo STR(*** Making SimpleLibraryT libname Templates) @@\
|
||||
find ./Templates.DB -name '*.o' -type f -print | xargs -n4 ar cq $@ @@\
|
||||
@@\
|
||||
clean:: @@\
|
||||
@@ -170,11 +170,11 @@ clean:: @@\
|
||||
#define SimpleLibraryT(libname,objlist,libdir) @@\
|
||||
SimpleLibrary(libname,objlist,libdir) @@\
|
||||
@@\
|
||||
AllTarget(Concat(lib,libname/**/T.a)) @@\
|
||||
AllTarget(Concat3(lib,libname,T.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname/**/T.a): TemplateObjs @@\
|
||||
Concat3(lib,libname,T.a): TemplateObjs @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making SimpleLibraryT libname Templates" @@\
|
||||
@echo STR(*** Making SimpleLibraryT libname Templates) @@\
|
||||
$(AR) $@ TemplateObjs @@\
|
||||
@@\
|
||||
clean:: @@\
|
||||
@@ -186,7 +186,7 @@ AllTarget(Concat(lib,libname.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname.a): objlist @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making RealLibrary libname.a" @@\
|
||||
@echo STR(*** Making RealLibrary libname.a) @@\
|
||||
ar cq $@ objlist @@\
|
||||
RanLibrary($@)
|
||||
|
||||
@@ -195,18 +195,18 @@ AllTarget(Concat(lib,libname.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname.a): objlist otherdeps @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making NotSoSimpleLibrary libname.a" @@\
|
||||
@echo STR(*** Making NotSoSimpleLibrary libname.a) @@\
|
||||
$(LD) -r -o $@ objlist
|
||||
|
||||
#if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
|
||||
#define NotSoSimpleLibraryT(libname,objlist,libdir,otherdeps) @@\
|
||||
NotSoSimpleLibrary(libname,objlist,libdir,otherdeps) @@\
|
||||
@@\
|
||||
AllTarget(Concat(lib,libname/**/T.a)) @@\
|
||||
AllTarget(Concat3(lib,libname,T.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname/**/T.a): @@\
|
||||
Concat3(lib,libname,T.a): @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making NotSoSimpleLibraryT libname Templates"@@\
|
||||
@echo STR(*** Making NotSoSimpleLibraryT libname Templates) @@\
|
||||
find ./Templates.DB -name '*.o' -type f -print | xargs -n4 ar cq $@ @@\
|
||||
@@\
|
||||
clean:: @@\
|
||||
@@ -215,11 +215,11 @@ clean:: @@\
|
||||
#define NotSoSimpleLibraryT(libname,objlist,libdir,otherdeps) @@\
|
||||
NotSoSimpleLibrary(libname,objlist,libdir,otherdeps) @@\
|
||||
@@\
|
||||
AllTarget(Concat(lib,libname/**/T.a)) @@\
|
||||
AllTarget(Concat3(lib,libname,T.a)) @@\
|
||||
@@\
|
||||
Concat(lib,libname/**/T.a): @@\
|
||||
Concat3(lib,libname,T.a): @@\
|
||||
$(RM) $@ @@\
|
||||
@echo "### Making NotSoSimpleLibraryT libname Templates"@@\
|
||||
@echo STR(*** Making NotSoSimpleLibraryT libname Templates) @@\
|
||||
$(AR) $@ TemplateObjs @@\
|
||||
@@\
|
||||
clean:: @@\
|
||||
|
||||
@@ -15,20 +15,33 @@ XCOMM platform: $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
|
||||
#ifndef OSTeenyVersion
|
||||
#define OSTeenyVersion DefaultOSTeenyVersion
|
||||
#endif
|
||||
XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
|
||||
XCOMM operating system: OSName (OSMajorVersion/**/./**/OSMinorVersion/**/./**/OSTeenyVersion)
|
||||
|
||||
#define HasPutenv YES
|
||||
#define HasBSD44Sockets YES
|
||||
#define HasZlib YES
|
||||
|
||||
#ifndef CppCmd
|
||||
#if OSMajorVersion >= 5
|
||||
#define CppCmd /usr/bin/cpp -traditional
|
||||
#define PreProcessCmd /usr/bin/cpp -traditional
|
||||
#else
|
||||
#define CppCmd /usr/libexec/cpp -traditional
|
||||
#define PreProcessCmd /usr/libexec/cpp -traditional
|
||||
#if OSMajorVersion >= 10 && defined(UseGcc)
|
||||
USE_GCC = UseGcc
|
||||
#endif
|
||||
|
||||
#ifndef CppCmd
|
||||
#if OSMajorVersion >= 10 && defined(UseGcc)
|
||||
# define CppCmd /usr/local/bin/cpp$(USE_GCC)
|
||||
#else
|
||||
# define CppCmd /usr/bin/cpp
|
||||
#endif
|
||||
#endif
|
||||
#define PreProcessCmd CppCmd
|
||||
|
||||
#if OSMajorVersion >= 10
|
||||
#define CppArgs -Wno-invalid-pp-token
|
||||
#else
|
||||
#define CppArgs /**/
|
||||
#endif
|
||||
|
||||
#ifndef StandardCppDefines
|
||||
#define StandardCppDefines -traditional CppArgs
|
||||
#endif
|
||||
|
||||
#undef InstallCmd
|
||||
@@ -71,19 +84,33 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
|
||||
#define MkdirHierCmd mkdir -p
|
||||
|
||||
#ifndef CcCmd
|
||||
#define CcCmd gcc
|
||||
#ifndef DefaultCCOptions
|
||||
#define DefaultCCOptions -pipe
|
||||
#if OSMajorVersion >= 10
|
||||
# if defined(UseGcc)
|
||||
# define CcCmd /usr/local/bin/gcc$(USE_GCC)
|
||||
# define CplusplusCmd /usr/local/bin/g++$(USE_GCC)
|
||||
# else
|
||||
# define CcCmd cc
|
||||
# define CplusplusCmd c++
|
||||
# endif
|
||||
#else
|
||||
# define CcCmd gcc
|
||||
# define CplusplusCmd g++
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DefaultCCOptions
|
||||
#define DefaultCCOptions -pipe
|
||||
#endif
|
||||
|
||||
#ifndef CplusplusLibC
|
||||
#define CplusplusLibC -lstdc++
|
||||
#endif
|
||||
|
||||
#if OSMajorVersion > 1
|
||||
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
|
||||
#define XawI18nDefines -DUSE_XWCHAR_STRING
|
||||
#define HasMakefileSafeInclude YES
|
||||
#define IncludeMakefile(file) @@# dependencies are in .depend
|
||||
#define IncludeMakefile(file) HASH_SIGN dependencies are in .depend
|
||||
#define DependFileName .depend
|
||||
#if OSMajorVersion < 3
|
||||
#if OSMinorVersion < 2
|
||||
@@ -148,7 +175,7 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
|
||||
#endif
|
||||
|
||||
#ifndef OptimizedCDebugFlags
|
||||
# ifdef i386Architecture
|
||||
# if defined(i386Architecture) || defined(AMD64Architecture)
|
||||
# define OptimizedCDebugFlags DefaultGcc2i386Opt
|
||||
# else
|
||||
# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
|
||||
@@ -156,11 +183,16 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
|
||||
#endif
|
||||
|
||||
#ifdef HasGcc2
|
||||
CXXDEPENDINCLUDE != CppCmd -x c++ -Wp,-v < /dev/null \
|
||||
2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p'
|
||||
CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
|
||||
2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
|
||||
#define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
|
||||
#endif
|
||||
|
||||
/* beginning with svn version 254273 iconv functions are moved to libc */
|
||||
#if (OSMajorVersion >= 10)
|
||||
ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
|
||||
#endif
|
||||
|
||||
#define ServerExtraDefines GccGasOption XFree86ServerDefines
|
||||
|
||||
#define StandardDefines -DCSRG_BASED
|
||||
|
||||
@@ -162,6 +162,9 @@ XCOMM rules: $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
|
||||
* CppSourceFile (dst,src,defs,deplist)
|
||||
* MakeDirectories (step,dirs)
|
||||
* AllTarget (depends)
|
||||
* MakeImakeDir ()
|
||||
* DoUDB_SCRIPT3 (target, file, script, build)
|
||||
* DoUDB_SCRIPT4 (target, file, script, build)
|
||||
*
|
||||
*
|
||||
* The following are in specific <os>Lib.rules:
|
||||
@@ -175,6 +178,16 @@ XCOMM rules: $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
|
||||
|
||||
#define NullParameter
|
||||
|
||||
/* stringify macro */
|
||||
#ifndef STR
|
||||
# if defined(__llvm__)
|
||||
# define STR2(x) #x
|
||||
# else
|
||||
# define STR2(x) "x"
|
||||
# endif
|
||||
#define STR(x) STR2(x)
|
||||
#endif
|
||||
|
||||
/* if [ -d ] or [ ! -d ] causes make to fail, define this as - */
|
||||
#ifndef DirFailPrefix
|
||||
#define DirFailPrefix
|
||||
@@ -210,7 +223,7 @@ XCOMM special target for clearmake @@\
|
||||
* Concat - concatenates two strings.
|
||||
*/
|
||||
#ifndef Concat
|
||||
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
|
||||
#define Concat(a,b)a##b
|
||||
#else
|
||||
#define Concat(a,b)a/**/b
|
||||
@@ -221,7 +234,7 @@ XCOMM special target for clearmake @@\
|
||||
* Concat3 - concatenates three strings.
|
||||
*/
|
||||
#ifndef Concat3
|
||||
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
|
||||
#define Concat3(a,b,c)a##b##c
|
||||
#else
|
||||
#define Concat3(a,b,c)a/**/b/**/c
|
||||
@@ -232,7 +245,7 @@ XCOMM special target for clearmake @@\
|
||||
* Concat4 - concatenates four strings.
|
||||
*/
|
||||
#ifndef Concat4
|
||||
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
|
||||
#define Concat4(a,b,c,d)a##b##c##d
|
||||
#else
|
||||
#define Concat4(a,b,c,d)a/**/b/**/c/**/d
|
||||
@@ -262,7 +275,7 @@ XCOMM special target for clearmake @@\
|
||||
* exists to avoid problems with some preprocessors
|
||||
*/
|
||||
#ifndef _XUseCat
|
||||
# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||
# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
|
||||
# if defined(UseInstalled) || UseInstalledX11
|
||||
# define _XUseCat(a,b,c) a##c
|
||||
# else
|
||||
@@ -2486,6 +2499,44 @@ step:: @@\
|
||||
all:: depends
|
||||
#endif /* AllTarget */
|
||||
|
||||
|
||||
/*
|
||||
* MakeImakeDir - call make in imake directory.
|
||||
*/
|
||||
#ifndef MakeImakeDir
|
||||
#define MakeImakeDir() cd $(IMAKESRC) && \ @@\
|
||||
if [ -f Makefile ]; then \ @@\
|
||||
$(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \ @@\
|
||||
else \ @@\
|
||||
$(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \ @@\
|
||||
fi
|
||||
#endif /* MakeImakeDir */
|
||||
|
||||
|
||||
/*
|
||||
* DoUDB_SCRIPT3 - macro for creation of udb scripts for installation
|
||||
*/
|
||||
#ifndef DoUDB_SCRIPT3
|
||||
#define DoUDB_SCRIPT3(target, file, script, build) @@\
|
||||
target:: $(DATABASE_DIR)/file.udb @@\
|
||||
script -toLst -ReleaseStream $(PLATFORM) \ @@\
|
||||
$(DATABASE_DIR)/file.udb > file.lst @@\
|
||||
build file ../../..
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* DoUDB_SCRIPT4 - macro for creation of udb scripts for installation
|
||||
*/
|
||||
#ifndef DoUDB_SCRIPT4
|
||||
#define DoUDB_SCRIPT4(target, file, script, build) @@\
|
||||
target:: $(DATABASE_DIR)/file.udb @@\
|
||||
script -toLst -ReleaseStream $(PLATFORM) \ @@\
|
||||
$(DATABASE_DIR)/file.udb > file.lst @@\
|
||||
build file ../../../..
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DefineOldLibraryRules
|
||||
#include <oldlib.rules>
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,8 @@ XCOMM
|
||||
#define YES 1
|
||||
#define NO 0
|
||||
|
||||
#define HASH_SIGN #
|
||||
|
||||
/* Ensure that "all" is the default target in the Makefile. */
|
||||
all::
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ XCOMM $TOG: Motif.tmpl /main/6 1999/05/19 17:00:05 mgreess $
|
||||
#endif
|
||||
|
||||
#ifndef _MUseCat
|
||||
# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||
# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
|
||||
# if UseInstalledMotif
|
||||
# define _MUseCat(a,b,c) a##c
|
||||
# else
|
||||
|
||||
@@ -305,6 +305,10 @@ CXXDEPENDINCLUDE != CppCmd -x c++ -Wp,-v < /dev/null \
|
||||
# define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB) -Wl,-rpath,$(USRLIBDIRPATH)
|
||||
#endif
|
||||
|
||||
#ifndef SharedDtHelpReqs
|
||||
# define SharedDtHelpReqs $(LDPRELIBS) $(ICONVSYSLIB) SharedXReqs -Wl,-rpath,$(USRLIBDIRPATH)
|
||||
#endif
|
||||
|
||||
#ifndef SharedCsaReqs
|
||||
# define SharedCsaReqs -lXt $(LDPOSTLIBS) -Wl,-rpath,$(USRLIBDIRPATH)
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,10 @@ XCOMM $XConsortium: bsdLib.tmpl /main/3 1996/09/28 16:09:25 rws $
|
||||
# define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB)
|
||||
#endif
|
||||
|
||||
#ifndef SharedDtHelpReqs
|
||||
# define SharedDtHelpReqs $(LDPRELIBS) $(ICONVSYSLIB) SharedXReqs
|
||||
#endif
|
||||
|
||||
#ifndef SharedCsaReqs
|
||||
# define SharedCsaReqs -lXt $(LDPOSTLIBS)
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $
|
||||
#endif
|
||||
|
||||
#ifndef _CUseCat
|
||||
# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||
# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
|
||||
# if UseInstalledCDE
|
||||
# define _CUseCat(a,b,c) a##c
|
||||
# else
|
||||
|
||||
Reference in New Issue
Block a user