# load user-specific settings if they exist
-include config.mk
+# cc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -c -o build/lib/Scrt1.o source/musl/crt/Scrt1.c -fPIC -fno-stack-protector -DCRT
+#gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -fPIC -fno-stack-protector -DCRT -c -o obj/crt/Scrt1.o crt/Scrt1.c
+#
+# cc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -c -o build/lib/crt1.o source/musl/crt/crt1.c -fno-stack-protector -DCRT
+#gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -fno-stack-protector -DCRT -c -o obj/crt/crt1.o crt/crt1.c
+#
+# cc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -c -o build/lib/rcrt1.o source/musl/crt/rcrt1.c -fPIC -fno-stack-protector -DCRT
+#gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -fPIC -fno-stack-protector -DCRT -c -o obj/crt/rcrt1.o crt/rcrt1.c
+#
+# cc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -c -o build/lib/crti.o source/musl/crt/x86_64/crti.s -DCRT
+#gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -DCRT -c -o obj/crt/x86_64/crti.o crt/x86_64/crti.s
+#
+# cc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -c -o build/lib/crtn.o source/musl/crt/x86_64/crtn.s -DCRT
+#gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -include vis.h -DCRT -c -o obj/crt/x86_64/crtn.o crt/x86_64/crtn.s
+
+
+
#------------------------------------------------------------------------------
# Ensure The Build Dir Exists
#------------------------------------------------------------------------------
$(MKSH_OBJDIR)/edit.o \
$(MKSH_OBJDIR)/strlcpy.o
-MKSH_DEFINES = \
- -DMKSH_BUILD_R=523 \
- -DMKSH_BUILDSH \
- -DHAVE_ATTRIBUTE_BOUNDED=0 \
- -DHAVE_ATTRIBUTE_FORMAT=1 \
- -DHAVE_ATTRIBUTE_NORETURN=1 \
- -DHAVE_ATTRIBUTE_PURE=1 \
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