diff --git a/Makefile b/Makefile
index 9522cf2..fb8d6c9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
# makefile to fail if any command in pipe is failed.
SHELL = /bin/bash -o pipefail
-# using gcc version 10.2.1
+MAKEFLAGS += "-j $(shell nproc)"
+# using gcc version 10.2.1
BASE = arm-none-linux-gnueabihf
CC = $(BASE)-gcc
@@ -50,6 +51,8 @@ DFLAGS = $(INCLUDE) -D_7ZIP_ST -DPACKAGE_VERSION=\"1.3.3\" -DFLAC_API_EXPORTS -D
CFLAGS = $(DFLAGS) -Wall -Wextra -Wno-strict-aliasing -Wno-stringop-overflow -Wno-stringop-truncation -Wno-format-truncation -Wno-psabi -Wno-restrict -c -O3
LFLAGS = -lc -lstdc++ -lm -lrt $(IMLIB2_LIB) -Llib/bluetooth -lbluetooth -lpthread
+OUTPUT_FILTER = sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
+
ifeq ($(PROFILING),1)
DFLAGS += -DPROFILING
endif
@@ -68,24 +71,26 @@ clean:
%.c.o: %.c
$(Q)$(info $<)
- $(Q)$(CC) $(CFLAGS) -std=gnu99 -o $@ -c $< 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
+ $(Q)$(CC) $(CFLAGS) -std=gnu99 -o $@ -c $< 2>&1 | $(OUTPUT_FILTER)
%.cpp.o: %.cpp
$(Q)$(info $<)
- $(Q)$(CC) $(CFLAGS) -std=gnu++14 -Wno-class-memaccess -o $@ -c $< 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
+ $(Q)$(CC) $(CFLAGS) -std=gnu++14 -Wno-class-memaccess -o $@ -c $< 2>&1 | $(OUTPUT_FILTER)
%.png.o: %.png
$(Q)$(info $<)
- $(Q)$(LD) -r -b binary -o $@ $< 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
+ $(Q)$(LD) -r -b binary -o $@ $< 2>&1 | $(OUTPUT_FILTER)
ifneq ($(MAKECMDGOALS), clean)
-include $(DEP)
endif
%.c.d: %.c
- $(Q)$(CC) $(DFLAGS) -MM $< -MT $@ -MT $*.c.o -MF $@ 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
+ $(Q)$(info $< >> $@)
+ $(Q)$(CC) $(DFLAGS) -MM $< -MT $@ -MT $*.c.o -MF $@ 2>&1 | $(OUTPUT_FILTER)
%.cpp.d: %.cpp
- $(Q)$(CC) $(DFLAGS) -MM $< -MT $@ -MT $*.cpp.o -MF $@ 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
+ $(Q)$(info $< >> $@)
+ $(Q)$(CC) $(DFLAGS) -MM $< -MT $@ -MT $*.cpp.o -MF $@ 2>&1 | $(OUTPUT_FILTER)
# Ensure correct time stamp
main.cpp.o: $(filter-out main.cpp.o, $(OBJ))
diff --git a/MiSTer.vcxproj b/MiSTer.vcxproj
index 99918f3..2b1f343 100644
--- a/MiSTer.vcxproj
+++ b/MiSTer.vcxproj
@@ -26,9 +26,9 @@
- %systemroot%\sysnative\windowspowershell\v1.0\powershell.exe wsl bash -lic ./build.sh
+ wsl bash -lic ./build.sh
MiSTer
- %systemroot%\sysnative\windowspowershell\v1.0\powershell.exe wsl bash -lic ./clean.sh
+ wsl bash -lic ./clean.sh
__arm__;__GNUC__;__USE_GNU ;_GNU_SOURCE;VDATE="000000";_FILE_OFFSET_BITS=64;_LARGEFILE64_SOURCE;$(NMakePreprocessorDefinitions)
c:\Work\MiSTer\toolchain\gcc103\arm-none-linux-gnueabihf\libc\usr\include;c:\Work\MiSTer\toolchain\gcc103\lib\gcc\arm-none-linux-gnueabihf\10.3.1\include;c:\Work\MiSTer\toolchain\gcc103\arm-none-linux-gnueabihf\include\c++\10.3.1;c:\Work\MiSTer\toolchain\gcc103\arm-none-linux-gnueabihf\include\c++\10.3.1\arm-linux-gnueabihf;$(NMakeIncludeSearchPath);lib\libco;lib\miniz;lib\lodepng;lib\libchdr\include;lib\bluetooth
$(TEMP)
diff --git a/build.sh b/build.sh
index 1faa048..45da2fd 100644
--- a/build.sh
+++ b/build.sh
@@ -1,7 +1,5 @@
#!/bin/bash
-echo "Start building..."
-
# create simple text file named 'host' in this folder with IP address of your MiSTer.
HOST=192.168.1.75
@@ -11,6 +9,8 @@ HOST=192.168.1.75
# so we don't need to check the exit status of every command.
set -e
set -o pipefail
+
+echo "Start building..."
make
set +e