summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-02 10:14:44 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-02 10:14:44 -0500
commitcb8fd2da1c98547146954181c6d18ae226e20a6f (patch)
treea5804c61b84635978803ddf4c2b931bb3b1c2fef
parenta7422b68db4d1c2d5d11545131223825e13cdc42 (diff)
base assembly inclusion on $(ARCH)-$(WORDSIZE)
-rwxr-xr-xmkmf.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/mkmf.sh b/mkmf.sh
index 7904d7b4..fbf1a3bb 100755
--- a/mkmf.sh
+++ b/mkmf.sh
@@ -70,7 +70,7 @@ for i in $(find src/${STANDARD} -name \*.c) $(find src/${STANDARD} -name \*.ref)
if [ ! -f .dep/${LIB}.a.mk ]; then
printf '%s_OBJS =' ${LIB} > .dep/${LIB}.a.mk
if [ ${LIB} = libc ]; then
- printf ' $(OBJDIR)/libc.o $(OBJDIR)/x86-64.o' >> .dep/${LIB}.a.mk
+ printf ' $(OBJDIR)/$(ARCH)-$(WORDSIZE).o' >> .dep/${LIB}.a.mk
fi
fi
printf ' \\\n\t$(OBJDIR)/%s.o' ${NAME} >> .dep/${LIB}.a.mk
@@ -83,7 +83,7 @@ if [ $(cat .dep/to-build) = ${STANDARD} ]; then
printf 'include .cc.mk\n' >> .deps.mk
printf 'include .cflags.mk\n' >> .deps.mk
printf 'include config.mk\n\n' >> .deps.mk
- printf 'INCLUDES=-I$(INCDIR) -I. -Inonstd/stubs\n' >> .deps.mk
+ printf 'INCLUDES=-I$(INCDIR)\n' >> .deps.mk
printf 'CFLAGS=$(INCLUDES) $(STD_CFLAGS) -g -fno-builtin -nostdinc -nostdlib -nodefaultlibs -Werror -Wall -Wextra -fPIC\n\n' >> .deps.mk
for i in .dep/lib*.a.mk; do
@@ -106,8 +106,7 @@ if [ $(cat .dep/to-build) = ${STANDARD} ]; then
cat .dep/*.o.mk >> .deps.mk
- printf '$(OBJDIR)/libc.o: nonstd/libc.c\n\t-@mkdir -p $(OBJDIR)\n\t$(CC) $(CFLAGS) -c $? -o $@\n\n' >> .deps.mk
- printf '$(OBJDIR)/x86-64.o: nonstd/x86-64.s\n\t-@mkdir -p $(OBJDIR)\n\t$(CC) $(CFLAGS) -c $? -o $@\n\n' >> .deps.mk
+ printf '$(OBJDIR)/$(ARCH)-$(WORDSIZE).o: src/internal/$(ARCH)-$(WORDSIZE).s\n\t-@mkdir -p $(OBJDIR)\n\t$(CC) $(CFLAGS) -c $? -o $@\n\n' >> .deps.mk
printf 'all:' >> .deps.mk
for i in .dep/lib*.a.mk; do