mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 12:14:39 +00:00
push to srcs
This commit is contained in:
parent
5c91165781
commit
6d956c80b9
11
Rules
11
Rules
@ -82,8 +82,9 @@
|
||||
SLINK stdc++
|
||||
SLINK m
|
||||
# --- Add source ---
|
||||
COMPILE engine
|
||||
COMPILE engine/OPENGL
|
||||
XCOMPILE engine/OPENGL/GLX
|
||||
WCOMPILE engine/OPENGL/WGL
|
||||
GCOMPILE engine/OPENGL/GLFW
|
||||
COMPILE engine engine
|
||||
COMPILE engine/OPENGL engine
|
||||
XCOMPILE engine/OPENGL/GLX engine
|
||||
WCOMPILE engine/OPENGL/WGL engine
|
||||
GCOMPILE engine/OPENGL/GLFW engine
|
||||
STATIC libnishbox.a engine
|
||||
|
10
configure
vendored
10
configure
vendored
@ -23,6 +23,7 @@ sub path_translate {
|
||||
}
|
||||
|
||||
my %labels = ();
|
||||
my %srcs = ();
|
||||
my @types = (
|
||||
"make"
|
||||
);
|
||||
@ -128,6 +129,7 @@ while($line = <RULES>){
|
||||
$command = $3;
|
||||
$arg = $4;
|
||||
}
|
||||
my @args = split(/[\t ]+/, $arg);
|
||||
while($label =~ /(.)/g){
|
||||
if(!($1 eq " ")){
|
||||
$run = $run && defined($labels{$1});
|
||||
@ -229,10 +231,13 @@ while($line = <RULES>){
|
||||
$LIBS = "$LIBS -l$arg";
|
||||
}
|
||||
}elsif($command eq "COMPILE"){
|
||||
opendir(my $dh, $arg);
|
||||
if(!defined($srcs{$args[1]})){
|
||||
@{$srcs{$args[1]}} = ();
|
||||
}
|
||||
opendir(my $dh, $args[0]);
|
||||
my @l = grep(/\.c$/, readdir($dh));
|
||||
foreach(@l){
|
||||
print("$_\n");
|
||||
push(@{$srcs{$args[1]}}, $args[0] . "/" . $_);
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
@ -247,3 +252,4 @@ print(" CFLAGS: $CFLAGS\n");
|
||||
print("LDFLAGS: $LDFLAGS\n");
|
||||
print(" LIBS: $LIBS\n");
|
||||
print("--------------------------------\n");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user