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 = ();