Skip to content

Commit 0f039a8

Browse files
committed
update gui makefile and parallelized package build
1 parent 802c959 commit 0f039a8

File tree

4 files changed

+34
-43
lines changed

4 files changed

+34
-43
lines changed

gui/Makefile

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,26 @@
1-
all:
2-
mkdir -p bin
3-
mkdir -p lib
4-
5-
make -C libwindow library
1+
LIBS = libwindow
2+
PROGRAMS = vflvm explorer imgview taskmgr sysctl netinfo paint
63

7-
make -C vflvm prog
8-
make -C explorer prog
9-
make -C imgview prog
10-
make -C taskmgr prog
11-
make -C sysctl prog
12-
make -C netinfo prog
4+
all:
5+
make build_libraries -j $(nproc)
6+
make build_programs -j $(nproc)
137

14-
make -C paint prog
8+
build_libraries: $(addsuffix _library,$(LIBS))
9+
build_programs: $(addsuffix _prog,$(PROGRAMS))
1510

16-
clean:
17-
make -C libwindow clean
11+
%_library:
12+
mkdir -p lib
13+
make -C $* library -j $(nproc)
1814

19-
make -C vflvm clean
20-
make -C explorer clean
21-
make -C imgview clean
22-
make -C taskmgr clean
23-
make -C sysctl clean
24-
make -C netinfo clean
15+
%_prog:
16+
mkdir -p bin
17+
make -C $* prog -j $(nproc)
2518

26-
make -C tic_tac_toe clean
27-
make -C paint clean
2819

20+
clean:
21+
$(foreach lib,$(LIBS),make -C $(lib) clean;)
22+
$(foreach prog,$(PROGRAMS),make -C $(prog) clean;)
2923

3024
compile_flags.txt:
31-
make -C libwindow compile_flags.txt
32-
33-
make -C vflvm compile_flags.txt
34-
make -C explorer compile_flags.txt
35-
make -C imgview compile_flags.txt
36-
make -C taskmgr compile_flags.txt
37-
make -C sysctl compile_flags.txt
38-
make -C netinfo compile_flags.txt
39-
40-
make -C paint compile_flags.txt
25+
$(foreach lib,$(LIBS),make -C $(lib) compile_flags.txt;)
26+
$(foreach prog,$(PROGRAMS),make -C $(prog) compile_flags.txt;)

pkgs/brainasm/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ if [ -d "installer" ]; then
1010
rm -rvf installer
1111
fi
1212

13-
make -f $1 -C src/src PROGRAM=brainasm.elf AUTHOR=glowman554 LIBS_ZIP=$2 extract_libs prog
13+
make -f $1 -C src/src PROGRAM=brainasm.elf AUTHOR=glowman554 LIBS_ZIP=$2 extract_libs
14+
make -f $1 -C src/src PROGRAM=brainasm.elf AUTHOR=glowman554 LIBS_ZIP=$2 prog -j $(nproc)
1415

1516
bash ../run_installer.sh $1 $2 $3
1617
cp -v installer/install.mex ../pkgs/brainasm_install.mex

pkgs/build.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ fi
1616

1717
mkdir -p pkgs
1818

19-
build_dir brainasm
20-
build_dir phoenix_tools
21-
build_dir phoenixv2_tools
22-
build_dir nyanmbr
23-
build_dir doom
24-
build_dir saf
25-
build_dir nextfs
26-
build_dir mcc
27-
19+
(
20+
build_dir brainasm &
21+
build_dir phoenix_tools &
22+
build_dir phoenixv2_tools &
23+
build_dir nyanmbr &
24+
build_dir doom &
25+
build_dir saf &
26+
build_dir nextfs &
27+
build_dir mcc &
28+
wait
29+
)
30+
2831
(
2932
cd pkgs
3033
echo export ACCEPT_ALL=1 > all.msh

pkgs/doom/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ if [ -d "installer" ]; then
1919
rm -rvf installer
2020
fi
2121

22-
make -C src LIBS_ZIP=$2 compile_flags.txt extract_libs prog
22+
make -C src LIBS_ZIP=$2 compile_flags.txt extract_libs
23+
make -C src LIBS_ZIP=$2 prog -j $(nproc)
2324

2425
bash ../run_installer.sh $1 $2 $3
2526
cp -v installer/install.mex ../pkgs/doom_install.mex

0 commit comments

Comments
 (0)