summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2023-11-27 14:06:22 -0500
committerJakob Kaivo <jkk@ung.org>2023-11-27 14:06:22 -0500
commit76a01870f1f3a7adc027b889c807dbfc7b93a8e2 (patch)
treee8e0f671ff5891543f24c1295c9de466fa08b41c
parent0030c5ea720f492fcaed2cd5ebb52f7ad54170fd (diff)
include assembly code in dependencies; disable SSE (it was causing crashes); remove __main from the shared library
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index dcfed103..f92a5b77 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ include .config.mk
AR=ar
ARFLAGS=rU
-BASE_CFLAGS=-g -Wall -Wextra -Werror -nostdinc -fno-builtin -fno-stack-protector -fPIC -I$(INCDIR) -Isrc
+BASE_CFLAGS=-g -O0 -mno-sse -Wall -Wextra -Werror -nostdinc -fno-builtin -fno-stack-protector -fPIC -I$(INCDIR) -Isrc
OBJDIR=obj
SRCDIR=src
@@ -19,9 +19,10 @@ cleandeps:
newdeps: cleandeps
printf '.POSIX:\n\nall:\n\n' > mk/deps.mk
for i in $$(find src -name \*.c); do sh mk/deps.sh $$i; done
+ for i in $$(find src -name \*.$(ARCHITECTURE)-$(WORDSIZE).s); do sh mk/deps.sh $$i; done
libung.so: libc.a libm.a
- $(CC) -o libung.so -shared obj/*.o
+ $(CC) -o libung.so -shared $$(ls -1 obj/*.o | grep -v __main.o)
deps:
$(MAKE) -f mk/deps.mk