Created
August 8, 2018 00:56
-
-
Save hhrhhr/3d24434f413af90d1b0b2d2f8c38858a to your computer and use it in GitHub Desktop.
Qbs profile for Tiny C Compiler and some examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbs | |
Project { | |
DynamicLibrary { | |
name: "usb-1.0" | |
qbs.profiles: "TCC-32" | |
Depends { name: "cpp" } | |
cpp.includePaths: [".", "./libusb-git/libusb"] | |
cpp.dynamicLibraries: ["advapi32"] | |
Group { | |
name: "lib" | |
prefix: "libusb-git/libusb/" | |
files: [ | |
"core.c", | |
"hotplug.c", | |
"descriptor.c", | |
"io.c", | |
"strerror.c", | |
"sync.c", | |
"os/poll_windows.c", | |
"os/threads_windows.c", | |
"os/windows_nt_common.c", | |
"os/windows_winusb.c", | |
"os/windows_usbdk.c" | |
] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "stress" | |
Depends { name: "usb-1.0" } | |
cpp.includePaths: [".", "./libusb-git/libusb"] | |
Group { | |
name: "tests" | |
prefix: "libusb-git/tests/" | |
files: ["stress.c", "testlib.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "xusb" | |
Depends { name: "usb-1.0" } | |
cpp.includePaths: [".", "./libusb-git/libusb"] | |
Group { | |
name: "xusb_example" | |
prefix: "libusb-git/examples/" | |
files: ["xusb.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "testlibusb" | |
Depends { name: "usb-1.0" } | |
cpp.includePaths: [".", "./libusb-git/libusb"] | |
Group { | |
name: "testlibusb_example" | |
prefix: "libusb-git/examples/" | |
files: ["testlibusb.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "listdevs" | |
Depends { name: "usb-1.0" } | |
cpp.includePaths: [".", "./libusb-git/libusb"] | |
Group { | |
name: "listdevs_example" | |
prefix: "libusb-git/examples/" | |
files: ["listdevs.c"] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbs | |
import "ProfileTCC.qbs" as ProjectTCC | |
ProjectTCC { | |
name: "Lua 5.3.5" | |
property string prefix: "./lua-5.3.5/src/" | |
property stringList files: ["lapi.c", "lcode.c", "lctype.c", "ldebug.c", "ldo.c", "ldump.c", "lfunc.c", "lgc.c", "llex.c", "lmem.c", "lobject.c", "lopcodes.c", "lparser.c", "lstate.c", "lstring.c", "ltable.c", "ltm.c", "lundump.c", "lvm.c", "lzio.c", "lauxlib.c", "lbaselib.c", "lbitlib.c", "lcorolib.c", "ldblib.c", "liolib.c", "lmathlib.c", "loslib.c", "lstrlib.c", "ltablib.c", "lutf8lib.c", "loadlib.c", "linit.c"] | |
CppApplication { | |
name: "luac" | |
qbs.profiles: "TCC-32" | |
Group { | |
name: "liblua" | |
prefix: project.prefix | |
files: project.files | |
} | |
Group { | |
name: "compiler" | |
prefix: project.prefix | |
files: "luac.c" | |
} | |
Group { | |
qbs.install: true | |
fileTagsFilter: product.type | |
} | |
} | |
DynamicLibrary { | |
name: "lua53" | |
qbs.profiles: "TCC-32" | |
Depends { name: "cpp" } | |
Group { | |
name: "library" | |
prefix: project.prefix | |
cpp.defines: ["LUA_BUILD_AS_DLL"] | |
files: project.files | |
} | |
Group { | |
qbs.install: true | |
fileTagsFilter: product.type | |
} | |
} | |
CppApplication { | |
name: "lua" | |
qbs.profiles: "TCC-32" | |
Depends { name: "lua53" } | |
Group { | |
name: "interpreter" | |
prefix: project.prefix | |
files: ["lua.c"] | |
} | |
Group { | |
qbs.install: true | |
fileTagsFilter: product.type | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbs | |
Project { | |
Profile { | |
// condition: true | |
name: "TCC-32" | |
qbs.toolchainType: "gcc" | |
qbs.architecture: "x86" | |
qbs.targetOS: "windows" | |
qbs.targetPlatform: "windows" | |
cpp.toolchainInstallPath: "e:/devel/tcc" | |
cpp.toolchainPrefix: "" | |
cpp.staticLibraryPrefix: "lib" | |
cpp.staticLibrarySuffix: ".a" | |
cpp.dynamicLibrarySuffix: ".dll" | |
cpp.executableSuffix: ".exe" | |
cpp.debugInfoSuffix: ".debug" | |
cpp.imageFormat: "pe" | |
cpp.windowsApiCharacterSet: "unicode" | |
// cpp.compilerName: "tcc.exe" | |
cpp.cCompilerName: "tcc.exe" | |
cpp.cxxCompilerName: "tcc.exe" | |
// cpp.compilerPathByLanguage: ({ | |
// "c": "e:/devel/tcc/tcc.exe", | |
// "cpp": undefined | |
// }) | |
// cpp.compilerPath: "e:/devel/tcc/tcc.exe" | |
// cpp.systemIncludePaths: [ | |
// "e:/devel/tcc/include", | |
// "e:/devel/tcc/include/winapi" | |
// ] | |
// cpp.compilerIncludePaths: [ | |
// "e:/devel/tcc/include", | |
// "e:/devel/tcc/include/winapi" | |
// ] | |
cpp.compilerFrameworkPaths: undefined | |
// cpp.compilerLibraryPaths: ["e:/devel/tcc/lib/", "C:/Windows/system32/"] | |
cpp.compilerVersionMajor: 0 | |
cpp.compilerVersionMinor: 9 | |
cpp.compilerVersionPatch: 27 | |
cpp.targetLinkerFlags: undefined | |
cpp.targetAssemblerFlags: undefined | |
// cpp.targetDriverFlags: undefined // need be not empty | |
cpp.cFlags: undefined | |
cpp.cppFlags: undefined | |
cpp.dsymutilFlags: undefined | |
cpp.platformLinkerFlags: undefined | |
cpp.commonCompilerFlags: undefined | |
cpp.driverFlags: "-bench" | |
cpp.driverLinkerFlags: undefined | |
cpp.linkerName: "tcc.exe" | |
// cpp.linkerPath: "e:/devel/tcc/tcc.exe" | |
cpp.linkerMode: "manual" | |
cpp.linkerFlags: undefined | |
cpp.archiverName: "tcc.exe" | |
cpp.archiverOpt: "-ar" | |
// cpp.archiverPath: "e:/devel/tcc/tcc.exe -ar" | |
cpp.visibility: undefined | |
cpp.positionIndependentCode: undefined | |
qbs.optimization: "none" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbs | |
Project { | |
DynamicLibrary { | |
name: "rtl-sdr" | |
qbs.profiles: "TCC-32" | |
Depends { name: "cpp" } | |
Depends { name: "usb-1.0" } | |
cpp.includePaths: ["./rtl-sdr/include", "./libusb-git/libusb"] | |
cpp.defines: ["_MSC_VER", "rtlsdr_EXPORTS"] | |
Group { | |
name: "lib" | |
prefix: "./rtl-sdr/src/" | |
files: [ | |
"librtlsdr.c", | |
"tuner_e4k.c", | |
"tuner_fc0012.c", | |
"tuner_fc0013.c", | |
"tuner_fc2580.c", | |
"tuner_r82xx.c" | |
] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "rtl_test" | |
Depends { name: "rtl-sdr" } | |
cpp.includePaths: ["./rtl-sdr/include"] | |
consoleApplication: true | |
Group { | |
prefix: "./rtl-sdr/src/" | |
files: ["rtl_test.c", "convenience/convenience.c", "getopt/getopt.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "rtl_sdr" | |
Depends { name: "rtl-sdr" } | |
cpp.includePaths: ["./rtl-sdr/include"] | |
consoleApplication: true | |
Group { | |
prefix: "./rtl-sdr/src/" | |
files: ["rtl_sdr.c", "convenience/convenience.c", "getopt/getopt.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "rtl_tcp" | |
Depends { name: "rtl-sdr" } | |
cpp.includePaths: ["./rtl-sdr/include", "."] | |
cpp.libraryPaths: ["."] | |
cpp.dynamicLibraries: ["ws2_32", "winpthread-1"] | |
consoleApplication: true | |
Group { | |
prefix: "./rtl-sdr/src/" | |
files: ["rtl_tcp.c", "convenience/convenience.c", "getopt/getopt.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "rtl_fm" | |
Depends { name: "rtl-sdr" } | |
cpp.includePaths: [".", "./rtl-sdr/include"] | |
cpp.libraryPaths: ["."] | |
cpp.dynamicLibraries: ["winpthread-1"] | |
consoleApplication: true | |
Group { | |
prefix: "./rtl-sdr/src/" | |
files: ["rtl_fm.c", "convenience/convenience.c", "getopt/getopt.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "rtl_eeprom" | |
Depends { name: "rtl-sdr" } | |
cpp.includePaths: ["./rtl-sdr/include"] | |
consoleApplication: true | |
Group { | |
prefix: "./rtl-sdr/src/" | |
files: ["rtl_eeprom.c", "convenience/convenience.c", "getopt/getopt.c"] | |
} | |
} | |
CppApplication { | |
qbs.profiles: "TCC-32" | |
name: "rtl_adsb" | |
Depends { name: "rtl-sdr" } | |
cpp.includePaths: ["./rtl-sdr/include", "."] | |
cpp.libraryPaths: ["."] | |
cpp.dynamicLibraries: ["winpthread-1"] | |
consoleApplication: true | |
Group { | |
prefix: "./rtl-sdr/src/" | |
files: ["rtl_adsb.c", "convenience/convenience.c", "getopt/getopt.c"] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment