summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-11-05 15:56:51 -0300
committerGitHub <noreply@github.com>2023-11-05 11:56:51 -0700
commit9e081075d0318b13b77d56c4089da65c747a7b9b (patch)
tree8fed9d2cfe1d2041e79e716549600e71fc0f6e87
parent5d09f00ebdd0bb97fff3ec209469d52420892546 (diff)
Makefile fixes for mac (#114)
* Don't invoke cpp when building `.s` files * abort a rule if a piped command fails * update missing step on the readme * macos
-rw-r--r--Makefile7
-rw-r--r--README.md1
2 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f62f830..12bca5d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@
MAKEFLAGS += --no-builtin-rules
+SHELL = /bin/bash
+.SHELLFLAGS = -o pipefail -c
+
#### Defaults ####
# If COMPARE is 1, check the output md5sum after building
@@ -79,7 +82,7 @@ $(error Native Windows is currently unsupported for building this repository, us
else ifeq ($(UNAME_S),Linux)
DETECTED_OS := linux
else ifeq ($(UNAME_S),Darwin)
- DETECTED_OS := mac
+ DETECTED_OS := macos
MAKE := gmake
CPPFLAGS += -xc++
endif
@@ -315,7 +318,7 @@ $(BUILD_DIR)/%.o: %.bin
$(OBJCOPY) -I binary -O elf32-big $< $@
$(BUILD_DIR)/%.o: %.s
- $(CPP) $(CPPFLAGS) $(BUILD_DEFINES) $(IINC) -I $(dir $*) $(COMMON_DEFINES) $(RELEASE_DEFINES) $(GBI_DEFINES) $(AS_DEFINES) $< | $(ICONV) $(ICONV_FLAGS) | $(AS) $(ASFLAGS) $(ENDIAN) $(IINC) -I $(dir $*) -o $@
+ $(ICONV) $(ICONV_FLAGS) $< | $(AS) $(ASFLAGS) $(ENDIAN) $(IINC) -I $(dir $*) -o $@
$(OBJDUMP_CMD)
$(BUILD_DIR)/%.o: %.c
diff --git a/README.md b/README.md
index a5e62f5..b489153 100644
--- a/README.md
+++ b/README.md
@@ -68,6 +68,7 @@ To start the extraction/build process, run the following command:
```bash
make setup
make extract
+make lib
make
```