aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-02-21 11:27:05 +0100
committerlemon <lsof@mailbox.org>2026-02-21 11:27:05 +0100
commit8dfd823f9f8b4d9bc43af473ab2758b3f1cc2012 (patch)
tree8b49ca1492c5ebc0562423c09c998db66c618e9f /configure
parentad8067a1ab1871cf57936828fb1b40c15cd3349d (diff)
config.mk, make install
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 12 insertions, 1 deletions
diff --git a/configure b/configure
index d9daa20..f48555b 100755
--- a/configure
+++ b/configure
@@ -14,12 +14,14 @@ Options:
--help Print this help mesage
--host=target-triple $host
--cc=cc C compiler [cc]
+ --prefix=PREFIX Installation path [/usr/local]
--sysroot=/path System root [/usr]
--includedir="/a/b",... System include dirs
EOF
}
sysroot=/usr
+prefix=/usr/local
host=
for arg ; do
@@ -29,6 +31,9 @@ for arg ; do
--includedir=*) host_include_dirs=${arg#*=} ;;
CC=*) CC=${arg#*=} ;;
--cc=*) CC=${arg#*=} ;;
+ CFLAGS=*) CFLAGS=${arg#*=} ;;
+ --cflags=*) CFLAGS=${arg#*=} ;;
+ --prefix=*) prefix=$(sh -c "echo ${arg#*=}") ;;
--help) prihelp ; exit ;;
*) die "$0: unknown option '$arg'"
esac
@@ -112,4 +117,10 @@ echo "/** GENERATED WITH $0 $@ **/
#define HOST_CC \"$CC\"
#endif // HOSTCONFIG_H_" > hostconfig.h
-echo config written to hostconfig.h
+
+echo "# GENERATED WITH $0 $@
+PREFIX = $prefix
+CC = $CC
+CFLAGS = ${CFLAGS:--Wall -std=c11 -pedantic}" > config.mk
+
+echo config written to hostconfig.h, config.mk