summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 92cc0c2..2f05bbb 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,17 @@ CC = gcc
CFLAGS = -Wall
SOURCES = $(addprefix src/, whatfiles.c attach.c utilities.c hashmap.c strings.c)
+ARCH = $(shell uname -m)
+ifeq ($(findstring arm,$(ARCH)), arm)
+ ARCH_DIR = arm32
+else
+ ARCH_DIR = x86_64
+endif
+
all: bin/whatfiles
bin/whatfiles: $(SOURCES)
- $(CC) $(CFLAGS) -o $@ $(SOURCES)
+ $(CC) $(CFLAGS) -o $@ $(SOURCES) src/$(ARCH_DIR)/registers.c
# utils