forked from pyrite-dev/milsko
configure updates, new 'tiny config' option
This commit is contained in:
parent
da3312cee9
commit
a00d4ba144
4 changed files with 32 additions and 12 deletions
27
configure
vendored
27
configure
vendored
|
|
@ -15,7 +15,7 @@ our $cc = defined($ENV{CC}) ? $ENV{CC} : "*host*gcc";
|
||||||
our $ar = defined($ENV{AR}) ? $ENV{AR} : "*host*ar";
|
our $ar = defined($ENV{AR}) ? $ENV{AR} : "*host*ar";
|
||||||
our $incdir = "-I include";
|
our $incdir = "-I include";
|
||||||
our $incdir2 = "";
|
our $incdir2 = "";
|
||||||
our $cflags = "-fPIC -D_MILSKO";
|
our $cflags = "-fPIC -D_MILSKO -fvisibility=hidden";
|
||||||
our $libdir = "";
|
our $libdir = "";
|
||||||
our $ldflags = "";
|
our $ldflags = "";
|
||||||
our $math = "-lm";
|
our $math = "-lm";
|
||||||
|
|
@ -46,18 +46,12 @@ param_set("vulkan-string-helper", 1);
|
||||||
param_set("shared", 1);
|
param_set("shared", 1);
|
||||||
param_set("static", 1);
|
param_set("static", 1);
|
||||||
param_set("examples", 1);
|
param_set("examples", 1);
|
||||||
if($target eq "Linux") {
|
|
||||||
param_set("x11", 1);
|
|
||||||
}
|
|
||||||
if($target eq "Linux") {
|
|
||||||
param_set("wayland", 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($target ne "Darwin") {
|
if($target ne "Darwin") {
|
||||||
param_set("freetype2", 1);
|
param_set("freetype2", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
my %features = (
|
my %features = (
|
||||||
"classic-theme" => "use classic theme",
|
"classic-theme" => "use classic theme",
|
||||||
"stb-image" => "use stb_image, instead use libjpeg/libpng",
|
"stb-image" => "use stb_image, instead use libjpeg/libpng",
|
||||||
|
|
@ -77,7 +71,7 @@ my @features_keys = (
|
||||||
"1opengl", "2xrender",
|
"1opengl", "2xrender",
|
||||||
"1vulkan", "2vulkan-string-helper",
|
"1vulkan", "2vulkan-string-helper",
|
||||||
"1shared", "1static",
|
"1shared", "1static",
|
||||||
"1wayland"
|
"1wayland",
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach my $l (@ARGV) {
|
foreach my $l (@ARGV) {
|
||||||
|
|
@ -96,9 +90,15 @@ foreach my $l (@ARGV) {
|
||||||
elsif ($l =~ /^--host=(.+)$/) {
|
elsif ($l =~ /^--host=(.+)$/) {
|
||||||
$host = $1 . "-";
|
$host = $1 . "-";
|
||||||
}
|
}
|
||||||
|
elsif ($l =~ /^--cflags=(.+)$/) {
|
||||||
|
add_cflags($1);
|
||||||
|
}
|
||||||
elsif ($l eq "--cross") {
|
elsif ($l eq "--cross") {
|
||||||
$cross = 1;
|
$cross = 1;
|
||||||
}
|
}
|
||||||
|
elsif ($l eq "--tiny") {
|
||||||
|
param_set("tiny",1);
|
||||||
|
}
|
||||||
elsif (($l eq "-h") or ($l eq "--help")) {
|
elsif (($l eq "-h") or ($l eq "--help")) {
|
||||||
print("Milsko Toolkit Configuration Utility\n");
|
print("Milsko Toolkit Configuration Utility\n");
|
||||||
print("\n");
|
print("\n");
|
||||||
|
|
@ -109,6 +109,8 @@ foreach my $l (@ARGV) {
|
||||||
print(" --prefix=PREFIX Installation prefix\n");
|
print(" --prefix=PREFIX Installation prefix\n");
|
||||||
print(" --host=TARGET Host for compiler/archiver\n");
|
print(" --host=TARGET Host for compiler/archiver\n");
|
||||||
print(" --target=TARGET Specify target\n");
|
print(" --target=TARGET Specify target\n");
|
||||||
|
print(" --cflags=CFLAGS Add cflags\n");
|
||||||
|
print(" --tiny Build smallest possible library\n");
|
||||||
print(" --cross Indicate cross compilation\n");
|
print(" --cross Indicate cross compilation\n");
|
||||||
print("\n");
|
print("\n");
|
||||||
print("Features:\n");
|
print("Features:\n");
|
||||||
|
|
@ -134,6 +136,13 @@ foreach my $l (@ARGV) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($target eq "Linux") {
|
||||||
|
param_set("x11", 1);
|
||||||
|
if(!param_get("tiny")){
|
||||||
|
param_set("wayland", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (-f "./pl/ostype/${target}.pl") {
|
if (-f "./pl/ostype/${target}.pl") {
|
||||||
require("./pl/ostype/${target}.pl");
|
require("./pl/ostype/${target}.pl");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
/*!
|
/*!
|
||||||
* @file Mw/LowLevel/Wayland.h
|
* @file Mw/LowLevel/Wayland.h
|
||||||
* @brief Work in progress Wayland Backend
|
* @brief Wayland Backend
|
||||||
* @warning This is used internally.
|
* @warning This is used internally.
|
||||||
* @warning This is disabled by default.
|
|
||||||
*/
|
*/
|
||||||
#ifndef __MW_LOWLEVEL_WAYLAND_H__
|
#ifndef __MW_LOWLEVEL_WAYLAND_H__
|
||||||
#define __MW_LOWLEVEL_WAYLAND_H__
|
#define __MW_LOWLEVEL_WAYLAND_H__
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,12 @@
|
||||||
#define MWDECL extern __declspec(dllexport)
|
#define MWDECL extern __declspec(dllexport)
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
#define MWDECL extern __declspec(dllimport)
|
#define MWDECL extern __declspec(dllimport)
|
||||||
|
#elif defined(__has_attribute)
|
||||||
|
#if __has_attribute(visibility)
|
||||||
|
#define MWDECL extern __attribute__((visibility("default")))
|
||||||
|
#else
|
||||||
|
#define MWDECL extern
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MWDECL extern
|
#define MWDECL extern
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
new_object("src/*.c");
|
new_object("src/*.c");
|
||||||
|
|
||||||
my $gl_libs = "";
|
my $gl_libs = "";
|
||||||
|
if (param_get("tiny")) {
|
||||||
|
add_cflags("-Oz");
|
||||||
|
}
|
||||||
if (param_get("classic-theme")) {
|
if (param_get("classic-theme")) {
|
||||||
add_cflags("-DUSE_CLASSIC_THEME");
|
add_cflags("-DUSE_CLASSIC_THEME");
|
||||||
}
|
}
|
||||||
|
|
@ -62,6 +64,10 @@ if (grep(/^cocoa$/, @backends)) {
|
||||||
|
|
||||||
if (param_get("stb-image")) {
|
if (param_get("stb-image")) {
|
||||||
add_cflags("-DUSE_STB_IMAGE");
|
add_cflags("-DUSE_STB_IMAGE");
|
||||||
|
if(param_get("tiny")) {
|
||||||
|
add_cflags("-DSTB_IMAGE_STATIC");
|
||||||
|
add_cflags("-DSTB_IMAGE_IMPLEMENTATION");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
new_object("external/libjpeg/src/*.c");
|
new_object("external/libjpeg/src/*.c");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue