From ca987f91aac19094a2ddcab1f88c7e4e2013b801 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sat, 29 Nov 2025 22:12:58 +0000 Subject: [PATCH] there we go git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@830 b9cfdab3-6d41-4d17-bbe4-086880011989 --- Makefile.pl | 20 ++++++++++---------- pl/ostype/Darwin.pl | 5 ----- pl/rules.pl | 5 +++-- pl/utils.pl | 4 +++- 4 files changed, 16 insertions(+), 18 deletions(-) delete mode 100644 pl/ostype/Darwin.pl diff --git a/Makefile.pl b/Makefile.pl index 443634c..fc32d9a 100755 --- a/Makefile.pl +++ b/Makefile.pl @@ -11,16 +11,16 @@ foreach my $l (@ARGV) { } } -our $prefix = "/usr/local"; -our $cc = defined($ENV{CC}) ? $ENV{CC} : "*host*gcc"; -our $ar = defined($ENV{AR}) ? $ENV{AR} : "*host*ar"; -our $incdir = "-I include"; -our $cflags = "-fPIC -D_MILSKO"; -our $libdir = ""; -our $ldflags = ""; -our $math = "-lm"; -our $shared = "-shared"; -our $backend = ""; +our $prefix = "/usr/local"; +our $cc = defined($ENV{CC}) ? $ENV{CC} : "*host*gcc"; +our $ar = defined($ENV{AR}) ? $ENV{AR} : "*host*ar"; +our $incdir = "-I include"; +our $cflags = "-fPIC -D_MILSKO"; +our $libdir = ""; +our $ldflags = ""; +our $math = "-lm"; +our $shared = "-shared"; +our @backends = (); our $library_prefix = "lib"; our $library_suffix = ".so"; diff --git a/pl/ostype/Darwin.pl b/pl/ostype/Darwin.pl deleted file mode 100644 index c51b686..0000000 --- a/pl/ostype/Darwin.pl +++ /dev/null @@ -1,5 +0,0 @@ -# $Id$ -$shared = "-dynamiclib"; -use_backend("darwin"); - -1; diff --git a/pl/rules.pl b/pl/rules.pl index acf6a2d..53264a0 100644 --- a/pl/rules.pl +++ b/pl/rules.pl @@ -6,7 +6,7 @@ my $gl_libs = ""; if (param_get("classic-theme")) { add_cflags("-DUSE_CLASSIC_THEME"); } -if ($backend eq "x11") { +if (grep(@backends, /^x11$/)) { add_cflags("-DUSE_X11"); new_object("src/backend/x11.c"); add_libs("-lX11"); @@ -18,7 +18,8 @@ if ($backend eq "x11") { add_libs("-lXrender"); } } -elsif ($backend eq "gdi") { + +if (grep(@backends, /^gdi$/)) { add_cflags("-DUSE_GDI"); new_object("src/backend/gdi.c"); add_libs("-lgdi32"); diff --git a/pl/utils.pl b/pl/utils.pl index 236d544..218f505 100644 --- a/pl/utils.pl +++ b/pl/utils.pl @@ -50,7 +50,9 @@ sub new_object { } sub use_backend { - $backend = $_[0]; + foreach my $l (@_) { + push(@backends, $l); + } } our %params = ();