git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@635 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-07 21:58:43 +00:00
parent 0cb5e1160f
commit 159e2781ce
2 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ define([library_targets],[])dnl
define([library_objects],[])dnl
define([new_object],[pushdef([source])define([source],patsubst(patsubst(patsubst(my_syscmd([sh -c "ls -d $1"]),[\..+$],object_suffix),[
],[ ]),[ $],[]))define([library_targets],ifelse(library_targets,[],[source],[library_targets source]))popdef([source])])dnl
define([print_library_targets],[foreach(x,space_to_comma(library_targets),[pushdef([source])define([source],[patsubst(x,[\]object_suffix[$],[.c])])dnl
define([print_library_targets],[foreach([x],space_to_comma(library_targets),[pushdef([source])define([source],[patsubst(x,[\]object_suffix[$],[.c])])dnl
x: source
$(CC) -c -fPIC $(CFLAGS) $(INCDIR) -o x source
popdef([source])])])dnl
@@ -35,7 +35,7 @@ define([new_example],[define($1[]_cflag,[$2])dnl
define($1[]_ldflag,[$3])dnl
define($1[]_lib,[$4])dnl
define([examples_targets],ifelse(examples_targets,[],[$1[]executable_suffix],[examples_targets $1[]executable_suffix]))])dnl
define([print_examples_targets],[foreach(x,space_to_comma(examples_targets),[pushdef(base)dnl
define([print_examples_targets],[foreach([x],space_to_comma(examples_targets),[pushdef(base)dnl
define([base],patsubst(x,[\..+$],[]))dnl
x: base[]object_suffix library
$(CC) -L src -Wl,-R./src $(LIBDIR) indir(base[]_ldflag) -o x base[]object_suffix -lMw $(MATH) indir(base[]_lib)

View File

@@ -1,3 +1,3 @@
dnl $Id$
define([my_syscmd],[syscmd([$* | tr '\n' ' ' | sed 's/ $//' > my_syscmd_out.out])dnl
define([my_syscmd],[syscmd([$* > my_syscmd_out.out])dnl
include(my_syscmd_out.out)[]syscmd([sh -c "rm -f my_syscmd_out.out"])])dnl