Add a proper build system
FossilOrigin-Name: 3bac4aa7d3604e08794a83ca9017fe0a21c33382b41a733325f2f969f3dc5e91
This commit is contained in:
parent
b28af99baa
commit
5e66df5cbf
14 changed files with 4943 additions and 462 deletions
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
*.a
|
||||
*.dll
|
||||
*.dylib
|
||||
*.o
|
||||
*.orig
|
||||
*.so
|
||||
*.so.*
|
||||
*~
|
||||
.deps
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
buildsys.mk
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
extra.mk
|
||||
tests/tests
|
||||
tests/tests.exe
|
22
Info.plist
22
Info.plist
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.webkeks.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>OIRC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
10
Makefile
10
Makefile
|
@ -1,7 +1,5 @@
|
|||
all:
|
||||
cd src && ${MAKE} ${MFLAGS}
|
||||
cd tests && ${MAKE} ${MFLAGS}
|
||||
SUBDIRS = src tests
|
||||
|
||||
clean:
|
||||
cd src && ${MAKE} ${MFLAGS} clean
|
||||
cd tests && ${MAKE} ${MFLAGS} clean
|
||||
include buildsys.mk
|
||||
|
||||
tests: src
|
||||
|
|
|
@ -1,389 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4BBE6ECE1338258D007EE595 /* IRCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BBE6ECA1338258D007EE595 /* IRCConnection.h */; };
|
||||
4BBE6ECF1338258D007EE595 /* IRCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BBE6ECB1338258D007EE595 /* IRCConnection.m */; };
|
||||
4BBE6EE313382DAE007EE595 /* IRCUser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BBE6EE113382DAE007EE595 /* IRCUser.h */; };
|
||||
4BBE6EE413382DAE007EE595 /* IRCUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BBE6EE213382DAE007EE595 /* IRCUser.m */; };
|
||||
4BBE6EFA133836A8007EE595 /* ObjIRC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBE6EB013382479007EE595 /* ObjIRC.framework */; };
|
||||
4BBE6EFD133836CC007EE595 /* test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BBE6EFB133836C2007EE595 /* test.m */; };
|
||||
4BBE6EFF133839F1007EE595 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBE6EFE133839F1007EE595 /* ObjFW.framework */; };
|
||||
4BBE6F0113383A06007EE595 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBE6F0013383A06007EE595 /* ObjFW.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
4BBE6EF613383686007EE595 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4BBE6EA613382479007EE595 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 4BBE6EAF13382479007EE595;
|
||||
remoteInfo = ObjIRC;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
4BBE6EE713383659007EE595 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4BBE6EB013382479007EE595 /* ObjIRC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjIRC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BBE6EC713382541007EE595 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
|
||||
4BBE6ECA1338258D007EE595 /* IRCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRCConnection.h; path = src/IRCConnection.h; sourceTree = SOURCE_ROOT; };
|
||||
4BBE6ECB1338258D007EE595 /* IRCConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IRCConnection.m; path = src/IRCConnection.m; sourceTree = SOURCE_ROOT; };
|
||||
4BBE6EE113382DAE007EE595 /* IRCUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRCUser.h; path = src/IRCUser.h; sourceTree = SOURCE_ROOT; };
|
||||
4BBE6EE213382DAE007EE595 /* IRCUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IRCUser.m; path = src/IRCUser.m; sourceTree = SOURCE_ROOT; };
|
||||
4BBE6EE913383659007EE595 /* Tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tests; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BBE6EFB133836C2007EE595 /* test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = test.m; path = tests/test.m; sourceTree = SOURCE_ROOT; };
|
||||
4BBE6EFE133839F1007EE595 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = /Library/Frameworks/ObjFW.framework; sourceTree = "<absolute>"; };
|
||||
4BBE6F0013383A06007EE595 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = /Library/Frameworks/ObjFW.framework; sourceTree = "<absolute>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
4BBE6EAC13382479007EE595 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BBE6F0113383A06007EE595 /* ObjFW.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4BBE6EE613383659007EE595 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BBE6EFF133839F1007EE595 /* ObjFW.framework in Frameworks */,
|
||||
4BBE6EFA133836A8007EE595 /* ObjIRC.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4BBE6EA413382479007EE595 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6EB913382479007EE595 /* ObjIRC */,
|
||||
4BBE6EED13383659007EE595 /* Tests */,
|
||||
4BBE6EB113382479007EE595 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BBE6EB113382479007EE595 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6EE913383659007EE595 /* Tests */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BBE6EB213382479007EE595 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6F0013383A06007EE595 /* ObjFW.framework */,
|
||||
4BBE6EB013382479007EE595 /* ObjIRC.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BBE6EB913382479007EE595 /* ObjIRC */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6F0213383A19007EE595 /* Frameworks */,
|
||||
4BBE6EBA1338247A007EE595 /* Supporting Files */,
|
||||
4BBE6ECA1338258D007EE595 /* IRCConnection.h */,
|
||||
4BBE6ECB1338258D007EE595 /* IRCConnection.m */,
|
||||
4BBE6EE113382DAE007EE595 /* IRCUser.h */,
|
||||
4BBE6EE213382DAE007EE595 /* IRCUser.m */,
|
||||
);
|
||||
path = ObjIRC;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BBE6EBA1338247A007EE595 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6EC713382541007EE595 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BBE6EED13383659007EE595 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6EB213382479007EE595 /* Frameworks */,
|
||||
4BBE6EFB133836C2007EE595 /* test.m */,
|
||||
);
|
||||
path = Tests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BBE6F0213383A19007EE595 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BBE6EFE133839F1007EE595 /* ObjFW.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
4BBE6EAD13382479007EE595 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BBE6ECE1338258D007EE595 /* IRCConnection.h in Headers */,
|
||||
4BBE6EE313382DAE007EE595 /* IRCUser.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
4BBE6EAF13382479007EE595 /* ObjIRC */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4BBE6EC21338247A007EE595 /* Build configuration list for PBXNativeTarget "ObjIRC" */;
|
||||
buildPhases = (
|
||||
4BBE6EAB13382479007EE595 /* Sources */,
|
||||
4BBE6EAC13382479007EE595 /* Frameworks */,
|
||||
4BBE6EAD13382479007EE595 /* Headers */,
|
||||
4BBE6EAE13382479007EE595 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ObjIRC;
|
||||
productName = ObjIRC;
|
||||
productReference = 4BBE6EB013382479007EE595 /* ObjIRC.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
4BBE6EE813383659007EE595 /* Tests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4BBE6EF313383659007EE595 /* Build configuration list for PBXNativeTarget "Tests" */;
|
||||
buildPhases = (
|
||||
4BBE6EE513383659007EE595 /* Sources */,
|
||||
4BBE6EE613383659007EE595 /* Frameworks */,
|
||||
4BBE6EE713383659007EE595 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4BBE6EF713383686007EE595 /* PBXTargetDependency */,
|
||||
);
|
||||
name = Tests;
|
||||
productName = Tests;
|
||||
productReference = 4BBE6EE913383659007EE595 /* Tests */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
4BBE6EA613382479007EE595 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 4BBE6EA913382479007EE595 /* Build configuration list for PBXProject "ObjIRC" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 4BBE6EA413382479007EE595;
|
||||
productRefGroup = 4BBE6EB113382479007EE595 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
4BBE6EE813383659007EE595 /* Tests */,
|
||||
4BBE6EAF13382479007EE595 /* ObjIRC */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
4BBE6EAE13382479007EE595 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4BBE6EAB13382479007EE595 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BBE6ECF1338258D007EE595 /* IRCConnection.m in Sources */,
|
||||
4BBE6EE413382DAE007EE595 /* IRCUser.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4BBE6EE513383659007EE595 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BBE6EFD133836CC007EE595 /* test.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
4BBE6EF713383686007EE595 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 4BBE6EAF13382479007EE595 /* ObjIRC */;
|
||||
targetProxy = 4BBE6EF613383686007EE595 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4BBE6EC01338247A007EE595 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = (
|
||||
"-fconstant-string-class=OFConstantString",
|
||||
"-fno-constant-cfstrings",
|
||||
);
|
||||
SDKROOT = macosx;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4BBE6EC11338247A007EE595 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = "";
|
||||
OTHER_CFLAGS = (
|
||||
"-fconstant-string-class=OFConstantString",
|
||||
"-fno-constant-cfstrings",
|
||||
);
|
||||
SDKROOT = macosx;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4BBE6EC31338247A007EE595 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = framework;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4BBE6EC41338247A007EE595 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = framework;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4BBE6EF413383659007EE595 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4BBE6EF513383659007EE595 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4BBE6EA913382479007EE595 /* Build configuration list for PBXProject "ObjIRC" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4BBE6EC01338247A007EE595 /* Debug */,
|
||||
4BBE6EC11338247A007EE595 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4BBE6EC21338247A007EE595 /* Build configuration list for PBXNativeTarget "ObjIRC" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4BBE6EC31338247A007EE595 /* Debug */,
|
||||
4BBE6EC41338247A007EE595 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4BBE6EF313383659007EE595 /* Build configuration list for PBXNativeTarget "Tests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4BBE6EF413383659007EE595 /* Debug */,
|
||||
4BBE6EF513383659007EE595 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 4BBE6EA613382479007EE595 /* Project object */;
|
||||
}
|
1421
build-aux/config.guess
vendored
Normal file
1421
build-aux/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load diff
1811
build-aux/config.sub
vendored
Normal file
1811
build-aux/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load diff
501
build-aux/install-sh
Normal file
501
build-aux/install-sh
Normal file
|
@ -0,0 +1,501 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
866
buildsys.mk.in
Normal file
866
buildsys.mk.in
Normal file
|
@ -0,0 +1,866 @@
|
|||
#
|
||||
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
||||
# Jonathan Schleifer <js@webkeks.org>
|
||||
#
|
||||
# https://webkeks.org/git/?p=buildsys.git
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice is present in all copies.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CPP = @CPP@
|
||||
DC = @DC@
|
||||
ERLC = @ERLC@
|
||||
OBJC = @OBJC@
|
||||
OBJCXX = @OBJCXX@
|
||||
AR = @AR@
|
||||
LD = ${CC}
|
||||
RANLIB = @RANLIB@
|
||||
PYTHON = @PYTHON@
|
||||
ASFLAGS = @ASFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
DFLAGS = @DFLAGS@
|
||||
ERLCFLAGS = @ERLCFLAGS@
|
||||
OBJCFLAGS = @OBJCFLAGS@
|
||||
OBJCXXFLAGS = @OBJCXXFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LDFLAGS_RPATH = @LDFLAGS_RPATH@
|
||||
LDFLAGS_INSTALL_NAME = @LDFLAGS_INSTALL_NAME@
|
||||
LIBS = @LIBS@
|
||||
PYTHON_FLAGS = @PYTHON_FLAGS@
|
||||
PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@
|
||||
PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@
|
||||
PROG_SUFFIX = @EXEEXT@
|
||||
LIB_CFLAGS = @LIB_CFLAGS@
|
||||
LIB_LDFLAGS = @LIB_LDFLAGS@
|
||||
LIB_PREFIX = @LIB_PREFIX@
|
||||
LIB_SUFFIX = @LIB_SUFFIX@
|
||||
PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
|
||||
PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
|
||||
PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
|
||||
INSTALL_LIB = @INSTALL_LIB@
|
||||
UNINSTALL_LIB = @UNINSTALL_LIB@
|
||||
CLEAN_LIB = @CLEAN_LIB@
|
||||
AS_DEPENDS = @AS_DEPENDS@
|
||||
CC_DEPENDS = @CC_DEPENDS@
|
||||
CXX_DEPENDS = @CXX_DEPENDS@
|
||||
OBJC_DEPENDS = @OBJC_DEPENDS@
|
||||
OBJCXX_DEPENDS = @OBJCXX_DEPENDS@
|
||||
LN_S = @LN_S@
|
||||
MKDIR_P = mkdir -p
|
||||
INSTALL = @INSTALL@
|
||||
SHELL = @SHELL@
|
||||
MSGFMT = @MSGFMT@
|
||||
JAVAC = @JAVAC@
|
||||
JAVACFLAGS = @JAVACFLAGS@
|
||||
JAR = @JAR@
|
||||
WINDRES = @WINDRES@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
plugindir ?= ${libdir}/${PACKAGE_NAME}
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
includedir = @includedir@
|
||||
includesubdir ?= ${PACKAGE_NAME}
|
||||
localedir = @localedir@
|
||||
localename ?= ${PACKAGE_NAME}
|
||||
mandir = @mandir@
|
||||
mansubdir ?= man1
|
||||
|
||||
OBJS1 = ${SRCS:.c=.o}
|
||||
OBJS2 = ${OBJS1:.cc=.o}
|
||||
OBJS3 = ${OBJS2:.cxx=.o}
|
||||
OBJS4 = ${OBJS3:.d=.o}
|
||||
OBJS5 = ${OBJS4:.erl=.beam}
|
||||
OBJS6 = ${OBJS5:.java=.class}
|
||||
OBJS7 = ${OBJS6:.m=.o}
|
||||
OBJS8 = ${OBJS7:.mm=.o}
|
||||
OBJS9 = ${OBJS8:.py=.pyc}
|
||||
OBJS10 = ${OBJS9:.rc=.o}
|
||||
OBJS11 = ${OBJS10:.S=.o}
|
||||
OBJS += ${OBJS11:.xpm=.o}
|
||||
|
||||
LIB_OBJS = ${OBJS:.o=.lib.o}
|
||||
PLUGIN_OBJS = ${OBJS:.o=.plugin.o}
|
||||
|
||||
MO_FILES = ${LOCALES:.po=.mo}
|
||||
|
||||
.SILENT:
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .beam .c .c.dep .cc .cc.dep .class .cxx .cxx.dep .d .erl .lib.o .java .mo .m .m.dep .mm .mm.dep .o .plugin.o .po .py .pyc .rc .S .S.dep .xpm
|
||||
.PHONY: all subdirs subdirs-after pre-depend depend install install-extra uninstall uninstall-extra clean distclean locales ${SUBDIRS} ${SUBDIRS_AFTER}
|
||||
|
||||
all:
|
||||
${MAKE} pre-all
|
||||
${MAKE} ${MFLAGS} subdirs
|
||||
${MAKE} ${MFLAGS} depend
|
||||
${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
|
||||
${MAKE} ${MFLAGS} subdirs-after
|
||||
${MAKE} post-all
|
||||
|
||||
pre-all post-all:
|
||||
|
||||
subdirs: ${SUBDIRS}
|
||||
subdirs-after: ${SUBDIRS_AFTER}
|
||||
|
||||
${SUBDIRS} ${SUBDIRS_AFTER}:
|
||||
for i in $@; do \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} ${MFLAGS} || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
depend: pre-depend ${SRCS}
|
||||
regen=0; \
|
||||
deps=""; \
|
||||
test -f .deps || regen=1; \
|
||||
for i in ${SRCS}; do \
|
||||
case $$i in \
|
||||
*.c) \
|
||||
if test x"${CC_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.cc | *.cxx) \
|
||||
if test x"${CXX_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.m) \
|
||||
if test x"${OBJC_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.mm) \
|
||||
if test x"${OBJCXX_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
*.S) \
|
||||
if test x"${AS_DEPENDS}" = x"yes"; then \
|
||||
test $$i -nt .deps && regen=1; \
|
||||
deps="$$deps $$i.dep"; \
|
||||
fi; \
|
||||
;; \
|
||||
esac; \
|
||||
done; \
|
||||
if test x"$$regen" = x"1" -a x"$$deps" != x""; then \
|
||||
${DEPEND_STATUS}; \
|
||||
if ${MAKE} ${MFLAGS} $$deps && cat $$deps >.deps; then \
|
||||
rm -f $$deps; \
|
||||
${DEPEND_OK}; \
|
||||
else \
|
||||
:> .deps; \
|
||||
touch -t 0001010000 .deps; \
|
||||
${DEPEND_FAILED}; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
.c.c.dep:
|
||||
${CPP} ${CPPFLAGS} ${CFLAGS} -M $< | \
|
||||
sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
|
||||
{ rm -f $@; false; }
|
||||
|
||||
.cc.cc.dep .cxx.cxx.dep:
|
||||
${CPP} ${CPPFLAGS} ${CXXFLAGS} -M $< | \
|
||||
sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
|
||||
{ rm -f $@; false; }
|
||||
|
||||
.m.m.dep:
|
||||
${CPP} ${CPPFLAGS} ${OBJCFLAGS} -M $< | \
|
||||
sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
|
||||
{ rm -f $@; false; }
|
||||
|
||||
.mm.mm.dep:
|
||||
${CPP} ${CPPFLAGS} ${OBJCPPFLAGS} -M $< | \
|
||||
sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
|
||||
{ rm -f $@; false; }
|
||||
|
||||
.S.S.dep:
|
||||
${CPP} ${CPPFLAGS} ${ASFLAGS} -M $< | \
|
||||
sed 's/^\([^\.]*\)\.o:/\1.o \1.lib.o \1.plugin.o:/' >$@ || \
|
||||
{ rm -f $@; false; }
|
||||
|
||||
pre-depend:
|
||||
|
||||
${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
if ${LD} -o $@ ${OBJS} ${OBJS_EXTRA} ${LDFLAGS} ${LIBS}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi
|
||||
|
||||
${JARFILE}: ${EXT_DEPS} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
if test x"${JAR_MANIFEST}" != x""; then \
|
||||
if ${JAR} cfm ${JARFILE} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi \
|
||||
else \
|
||||
if ${JAR} cf ${JARFILE} ${OBJS} ${OBJS_EXTRA}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${LD} -o $@ $$objs ${LIB_LDFLAGS} ${LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done
|
||||
|
||||
${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${PLUGIN_OBJS}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${LD} -o $@ $$objs ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done
|
||||
|
||||
${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
rm -f $@
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${OBJS} ${OBJS_EXTRA}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
rm -f $@; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done
|
||||
|
||||
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
rm -f $@
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
rm -f $@; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done
|
||||
|
||||
locales: ${MO_FILES}
|
||||
|
||||
.c.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.c.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.c.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.cc.o .cxx.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.cc.lib.o .cxx.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.cc.plugin.o .cxx.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.d.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if test x"$(basename ${DC})" = x"dmd"; then \
|
||||
if ${DC} ${DFLAGS} -c -of$@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi \
|
||||
else \
|
||||
if ${DC} ${DFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
.erl.beam:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.java.class:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${JAVAC} ${JAVACFLAGS} $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.m.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.m.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.m.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.mm.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.mm.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.mm.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.po.mo:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${MSGFMT} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.py.pyc:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.rc.o .rc.lib.o .rc.plugin.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${WINDRES} ${CPPFLAGS} -J rc -O coff -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.S.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${AS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.S.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.S.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$@} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.xpm.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.xpm.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.xpm.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
install: all install-extra
|
||||
for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} ${MFLAGS} install || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in ${SHARED_LIB}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${libdir} ${INSTALL_LIB}; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${PLUGIN}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${DATA}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${PROG}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${INCLUDES}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${MO_FILES}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && ${INSTALL} -m 644 $$i ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${MAN}; do \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
install-extra:
|
||||
|
||||
uninstall: uninstall-extra
|
||||
for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} ${MFLAGS} uninstall || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in ${SHARED_LIB}; do \
|
||||
if test -f ${DESTDIR}${libdir}/$$i; then \
|
||||
if : ${UNINSTALL_LIB}; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi; \
|
||||
done
|
||||
|
||||
for i in ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
|
||||
if test -f ${DESTDIR}${libdir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${libdir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${PLUGIN}; do \
|
||||
if test -f ${DESTDIR}${plugindir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${plugindir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
-rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1
|
||||
|
||||
for i in ${DATA}; do \
|
||||
if test -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
|
||||
if rm -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi; \
|
||||
rmdir "$$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i)" >/dev/null 2>&1 || true; \
|
||||
done
|
||||
-rmdir ${DESTDIR}${datadir}/${PACKAGE_NAME} >/dev/null 2>&1
|
||||
|
||||
for i in ${PROG}; do \
|
||||
if test -f ${DESTDIR}${bindir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${bindir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${INCLUDES}; do \
|
||||
if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
-rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1
|
||||
|
||||
for i in ${MO_FILES}; do \
|
||||
if test -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
|
||||
if rm -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in ${MAN}; do \
|
||||
if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
uninstall-extra:
|
||||
|
||||
clean:
|
||||
for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} ${MFLAGS} clean || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \
|
||||
if test -f $$i -o -d $$i; then \
|
||||
if rm -fr $$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
distclean: clean
|
||||
for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} ${MFLAGS} distclean || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in ${DISTCLEAN} .deps *~; do \
|
||||
if test -f $$i -o -d $$i; then \
|
||||
if rm -fr $$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
print-hierarchy:
|
||||
for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
echo ${PRINT_HIERARCHY_PREFIX}$$i; \
|
||||
cd $$i || exit $$?; \
|
||||
${MAKE} ${MFLAGS} PRINT_HIERARCHY_PREFIX=$$i/ print-hierarchy || exit $$?; \
|
||||
cd .. || exit $$?; \
|
||||
done
|
||||
|
||||
print-var:
|
||||
printf '%s\n' '${${VAR}}'
|
||||
|
||||
DIR_ENTER = printf "@TERM_EL@@TERM_SETAF6@Entering directory @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF6@.@TERM_SGR0@\n" "$$i"; cd $$i || exit $$?
|
||||
DIR_LEAVE = printf "@TERM_EL@@TERM_SETAF6@Leaving directory @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF6@.@TERM_SGR0@\n" "$$i"; cd .. || exit $$?
|
||||
DEPEND_STATUS = printf "@TERM_EL@@TERM_SETAF3@Generating dependencies...@TERM_SGR0@\r"
|
||||
DEPEND_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully generated dependencies.@TERM_SGR0@\n"
|
||||
DEPEND_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to generate dependencies!@TERM_SGR0@\n"; exit $$err
|
||||
COMPILE_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@.@TERM_SGR0@\n" "$<"
|
||||
COMPILE_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
COMPILE_LIB_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@ (lib)...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_LIB_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@ (lib).@TERM_SGR0@\n" "$<"
|
||||
COMPILE_LIB_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@ (lib)!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
COMPILE_PLUGIN_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@ (plugin)...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_PLUGIN_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@ (plugin).@TERM_SGR0@\n" "$<"
|
||||
COMPILE_PLUGIN_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@ (plugin)!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
LINK_STATUS = printf "@TERM_EL@@TERM_SETAF3@Linking @TERM_BOLD@$@@TERM_SGR0@@TERM_SETAF3@...@TERM_SGR0@\r"
|
||||
LINK_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully linked @TERM_BOLD@$@@TERM_SGR0@@TERM_SETAF2@.@TERM_SGR0@\n"
|
||||
LINK_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to link @TERM_BOLD@$@@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n"; exit $$err
|
||||
INSTALL_STATUS = printf "@TERM_EL@@TERM_SETAF3@Installing @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@...@TERM_SGR0@\r" "$$i"
|
||||
INSTALL_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully installed @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@.@TERM_SGR0@\n" "$$i"
|
||||
INSTALL_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to install @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n" "$$i"; exit $$err
|
||||
DELETE_OK = printf "@TERM_EL@@TERM_SETAF4@Deleted @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF4@.@TERM_SGR0@\n" "$$i"
|
||||
DELETE_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to delete @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n" "$$i"; exit $$err
|
||||
|
||||
.CURDIR ?= .
|
||||
include ${.CURDIR}/.deps
|
56
configure.ac
Normal file
56
configure.ac
Normal file
|
@ -0,0 +1,56 @@
|
|||
AC_INIT(ObjIRC, 0.1, js@heap.zone)
|
||||
BUILDSYS_INIT
|
||||
|
||||
AC_CONFIG_SRCDIR(src)
|
||||
AC_CONFIG_MACRO_DIR(m4)
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
|
||||
AC_CHECK_TOOL(OBJFW_CONFIG, objfw-config)
|
||||
AS_IF([test x"$OBJFW_CONFIG" = x""], [
|
||||
AC_MSG_ERROR(You need ObjFW and objfw-config installed!)
|
||||
])
|
||||
|
||||
test x"$OBJC" = x"" && OBJC="$($OBJFW_CONFIG --objc)"
|
||||
|
||||
AC_LANG([Objective C])
|
||||
AC_PROG_OBJC
|
||||
AC_PROG_OBJCPP
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_INSTALL
|
||||
AC_PATH_TOOL(AR, ar)
|
||||
AC_PROG_RANLIB
|
||||
|
||||
CPP="$OBJCPP"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)"
|
||||
OBJCFLAGS="$OBJCFLAGS -Wall $($OBJFW_CONFIG --objcflags)"
|
||||
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags --rpath)"
|
||||
LIBS="$LIBS $($OBJFW_CONFIG --libs)"
|
||||
|
||||
AC_ARG_ENABLE(shared,
|
||||
AS_HELP_STRING([--disable-shared], [do not build shared library]))
|
||||
AS_IF([test x"$enable_shared" != x"no"], [
|
||||
BUILDSYS_SHARED_LIB
|
||||
AC_SUBST(OBJIRC_SHARED_LIB, "${LIB_PREFIX}objirc${LIB_SUFFIX}")
|
||||
], [
|
||||
AC_SUBST(LIBOBJIRC_DEP, "../src/libobjirc.a")
|
||||
])
|
||||
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
|
||||
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
|
||||
AC_SUBST(OBJIRC_STATIC_LIB, "libobjirc.a")
|
||||
])
|
||||
|
||||
AS_IF([test x"$GOBJC" = x"yes"], [
|
||||
OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith -Werror"
|
||||
])
|
||||
|
||||
dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP
|
||||
dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself.
|
||||
AC_SUBST(CPP)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
|
||||
AS_IF([test x"$cross_compiling" != x"yes"], [
|
||||
AC_SUBST(RUN_TESTS, "run")
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([buildsys.mk extra.mk])
|
||||
AC_OUTPUT
|
8
extra.mk.in
Normal file
8
extra.mk.in
Normal file
|
@ -0,0 +1,8 @@
|
|||
OBJIRC_SHARED_LIB = @OBJIRC_SHARED_LIB@
|
||||
OBJIRC_STATIC_LIB = @OBJIRC_STATIC_LIB@
|
||||
OBJIRC_LIB_MAJOR = 0
|
||||
OBJIRC_LIB_MINOR = 0
|
||||
OBJIRC_LIB_MAJOR_MINOR = ${OBJIRC_LIB_MAJOR}.${OBJIRC_LIB_MINOR}
|
||||
|
||||
LIBOBJIRC_DEP = @LIBOBJIRC_DEP@
|
||||
RUN_TESTS = @RUN_TESTS@
|
205
m4/buildsys.m4
Normal file
205
m4/buildsys.m4
Normal file
|
@ -0,0 +1,205 @@
|
|||
dnl
|
||||
dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
||||
dnl Jonathan Schleifer <js@webkeks.org>
|
||||
dnl
|
||||
dnl https://webkeks.org/git/?p=buildsys.git
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, and/or distribute this software for any
|
||||
dnl purpose with or without fee is hereby granted, provided that the above
|
||||
dnl copyright notice and this permission notice is present in all copies.
|
||||
dnl
|
||||
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
dnl POSSIBILITY OF SUCH DAMAGE.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([BUILDSYS_INIT], [
|
||||
AC_CONFIG_COMMANDS_PRE([
|
||||
AC_SUBST(CC_DEPENDS, $GCC)
|
||||
AC_SUBST(CXX_DEPENDS, $GXX)
|
||||
AC_SUBST(OBJC_DEPENDS, $GOBJC)
|
||||
AC_SUBST(OBJCXX_DEPENDS, $GOBJCXX)
|
||||
|
||||
AC_PATH_PROG(TPUT, tput)
|
||||
|
||||
AS_IF([test x"$TPUT" != x""], [
|
||||
if x=$($TPUT el 2>/dev/null); then
|
||||
AC_SUBST(TERM_EL, "$x")
|
||||
else
|
||||
AC_SUBST(TERM_EL, "$($TPUT ce 2>/dev/null)")
|
||||
fi
|
||||
|
||||
if x=$($TPUT sgr0 2>/dev/null); then
|
||||
AC_SUBST(TERM_SGR0, "$x")
|
||||
else
|
||||
AC_SUBST(TERM_SGR0, "$($TPUT me 2>/dev/null)")
|
||||
fi
|
||||
|
||||
if x=$($TPUT bold 2>/dev/null); then
|
||||
AC_SUBST(TERM_BOLD, "$x")
|
||||
else
|
||||
AC_SUBST(TERM_BOLD, "$($TPUT md 2>/dev/null)")
|
||||
fi
|
||||
|
||||
if x=$($TPUT setaf 1 2>/dev/null); then
|
||||
AC_SUBST(TERM_SETAF1, "$x")
|
||||
AC_SUBST(TERM_SETAF2,
|
||||
"$($TPUT setaf 2 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF3,
|
||||
"$($TPUT setaf 3 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF4,
|
||||
"$($TPUT setaf 4 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF6,
|
||||
"$($TPUT setaf 6 2>/dev/null)")
|
||||
else
|
||||
AC_SUBST(TERM_SETAF1,
|
||||
"$($TPUT AF 1 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF2,
|
||||
"$($TPUT AF 2 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF3,
|
||||
"$($TPUT AF 3 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF4,
|
||||
"$($TPUT AF 4 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF6,
|
||||
"$($TPUT AF 6 2>/dev/null)")
|
||||
fi
|
||||
], [
|
||||
AC_SUBST(TERM_EL, '\033\133K')
|
||||
AC_SUBST(TERM_SGR0, '\033\133m')
|
||||
AC_SUBST(TERM_BOLD, '\033\1331m')
|
||||
AC_SUBST(TERM_SETAF1, '\033\13331m')
|
||||
AC_SUBST(TERM_SETAF2, '\033\13332m')
|
||||
AC_SUBST(TERM_SETAF3, '\033\13333m')
|
||||
AC_SUBST(TERM_SETAF4, '\033\13334m')
|
||||
AC_SUBST(TERM_SETAF6, '\033\13336m')
|
||||
])
|
||||
])
|
||||
|
||||
AC_CONFIG_COMMANDS_POST([
|
||||
${as_echo:="echo"} ${as_me:="configure"}": touching .deps files"
|
||||
for i in $(find . -name Makefile); do
|
||||
DEPSFILE="$(dirname $i)/.deps"
|
||||
test -f "$DEPSFILE" && rm "$DEPSFILE"
|
||||
touch -t 0001010000 "$DEPSFILE"
|
||||
done
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_MSG_CHECKING(whether we need an implib)
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
AC_MSG_RESULT(yes)
|
||||
PROG_IMPLIB_NEEDED='yes'
|
||||
PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a'
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
PROG_IMPLIB_NEEDED='no'
|
||||
PROG_IMPLIB_LDFLAGS=''
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(PROG_IMPLIB_NEEDED)
|
||||
AC_SUBST(PROG_IMPLIB_LDFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([BUILDSYS_SHARED_LIB], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_MSG_CHECKING(for shared library system)
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
AC_MSG_RESULT(Darwin)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.dylib'
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
LDFLAGS_INSTALL_NAME='-Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
|
||||
PLUGIN_SUFFIX='.bundle'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
mingw* | cygwin*)
|
||||
AC_MSG_RESULT(MinGW / Cygwin)
|
||||
LIB_CFLAGS=''
|
||||
LIB_LDFLAGS='-shared -Wl,--out-implib,${SHARED_LIB}.a'
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.dll'
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
PLUGIN_CFLAGS=''
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.dll'
|
||||
INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
|
||||
CLEAN_LIB='${SHARED_LIB}.a'
|
||||
;;
|
||||
openbsd* | mirbsd*)
|
||||
AC_MSG_RESULT(OpenBSD)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared'
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so.${LIB_MAJOR}.${LIB_MINOR}'
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
solaris*)
|
||||
AC_MSG_RESULT(Solaris)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}.${LIB_MINOR}'
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so'
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(ELF)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so'
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(LIB_CFLAGS)
|
||||
AC_SUBST(LIB_LDFLAGS)
|
||||
AC_SUBST(LIB_PREFIX)
|
||||
AC_SUBST(LIB_SUFFIX)
|
||||
AC_SUBST(LDFLAGS_RPATH)
|
||||
AC_SUBST(LDFLAGS_INSTALL_NAME)
|
||||
AC_SUBST(PLUGIN_CFLAGS)
|
||||
AC_SUBST(PLUGIN_LDFLAGS)
|
||||
AC_SUBST(PLUGIN_SUFFIX)
|
||||
AC_SUBST(INSTALL_LIB)
|
||||
AC_SUBST(UNINSTALL_LIB)
|
||||
AC_SUBST(CLEAN_LIB)
|
||||
])
|
48
src/Makefile
48
src/Makefile
|
@ -1,46 +1,16 @@
|
|||
LIB = objirc
|
||||
LIB_MAJOR = 0
|
||||
LIB_MINOR = 0
|
||||
include ../extra.mk
|
||||
|
||||
SHARED_LIB = ${OBJIRC_SHARED_LIB}
|
||||
STATIC_LIB = ${OBJIRC_STATIC_LIB}
|
||||
LIB_MAJOR = ${OBJIRC_LIB_MAJOR}
|
||||
LIB_MINOR = ${OBJIRC_LIB_MINOR}
|
||||
|
||||
SRCS = IRCConnection.m \
|
||||
IRCUser.m
|
||||
|
||||
HEADERS = ${SRCS:.m=.h} \
|
||||
INCLUDES = ${SRCS:.m=.h} \
|
||||
ObjIRC.h
|
||||
|
||||
CPPFLAGS += -I.
|
||||
OBJCFLAGS += -Werror
|
||||
include ../buildsys.mk
|
||||
|
||||
prefix ?= /usr/local
|
||||
|
||||
INSTALL ?= install
|
||||
OBJFW_CONFIG ?= objfw-config
|
||||
OBJFW_COMPILE ?= objfw-compile
|
||||
|
||||
LIB_PREFIX = `${OBJFW_CONFIG} --lib-prefix`
|
||||
LIB_SUFFIX = `${OBJFW_CONFIG} --lib-suffix`
|
||||
LIB_FILE = ${LIB_PREFIX}${LIB}${LIB_SUFFIX}
|
||||
|
||||
all:
|
||||
@objfw-compile \
|
||||
--lib ${LIB_MAJOR}.${LIB_MINOR} \
|
||||
-o objirc \
|
||||
--builddir build \
|
||||
${CPPFLAGS} \
|
||||
${OBJCFLAGS} \
|
||||
${SRCS}
|
||||
|
||||
clean:
|
||||
rm -f libobjirc.* *~
|
||||
rm -fr build
|
||||
|
||||
install:
|
||||
mkdir -p ${destdir}${prefix}/include/ObjIRC
|
||||
for i in ${HEADERS}; do \
|
||||
${INSTALL} -m 644 $$i \
|
||||
${destdir}${prefix}/include/ObjIRC/$$i; \
|
||||
done
|
||||
mkdir -p ${destdir}${prefix}/lib
|
||||
export LIB_MAJOR=${LIB_MAJOR}; \
|
||||
export LIB_MINOR=${LIB_MINOR}; \
|
||||
${INSTALL} -m 755 ${LIB_FILE} ${destdir}${prefix}/lib/${LIB_FILE}
|
||||
LD = ${OBJC}
|
||||
|
|
|
@ -1,5 +1,43 @@
|
|||
all:
|
||||
objfw-compile -Wall -g -o tests *.m -I../src -L../src -lobjirc
|
||||
include ../extra.mk
|
||||
|
||||
clean:
|
||||
rm -f tests *.o
|
||||
PROG_NOINST = tests${PROG_SUFFIX}
|
||||
SRCS = tests.m
|
||||
|
||||
include ../buildsys.mk
|
||||
|
||||
post-all: ${RUN_TESTS}
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
rm -f libobjirc.so.${OBJIRC_LIB_MAJOR}
|
||||
rm -f libobjirc.so.${OBJIRC_LIB_MAJOR_MINOR}
|
||||
rm -f libobjirc.dll libobjirc.${OBJIRC_LIB_MAJOR}.dylib
|
||||
if test -f ../src/libobjirc.so; then \
|
||||
${LN_S} ../src/libobjirc.so libobjirc.so.${OBJIRC_LIB_MAJOR}; \
|
||||
${LN_S} ../src/libobjirc.so \
|
||||
libobjirc.so.${OBJIRC_LIB_MAJOR_MINOR}; \
|
||||
elif test -f ../src/libobjirc.so.${OBJIRC_LIB_MAJOR_MINOR}; then \
|
||||
${LN_S} ../src/libobjirc.so.${OBJIRC_LIB_MAJOR_MINOR} \
|
||||
libobjirc.so.${OBJIRC_LIB_MAJOR_MINOR}; \
|
||||
fi
|
||||
if test -f ../src/libobjirc.dll; then \
|
||||
${LN_S} ../src/libobjirc.dll libobjirc.dll; \
|
||||
fi
|
||||
if test -f ../src/libobjirc.dylib; then \
|
||||
${LN_S} ../src/libobjirc.dylib \
|
||||
libobjirc.${OBJIRC_LIB_MAJOR}.dylib; \
|
||||
fi
|
||||
LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \
|
||||
DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
|
||||
LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \
|
||||
${TEST_LAUNCHER} ./${PROG_NOINST}; EXIT=$$?; \
|
||||
rm -f libobjirc.so.${OBJIRC_LIB_MAJOR}; \
|
||||
rm -f libobjirc.so.${OBJIRC_LIB_MAJOR_MINOR} libobjirc.dll; \
|
||||
rm -f libobjirc.${OBJIRC_LIB_MAJOR}.dylib; \
|
||||
exit $$EXIT
|
||||
|
||||
${PROG_NOINST}: ${LIBOBJIRC_DEP}
|
||||
|
||||
CPPFLAGS += -I../src -I../src/exceptions
|
||||
LIBS += -L../src -lobjirc
|
||||
LD = ${OBJC}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue