From 8dfd823f9f8b4d9bc43af473ab2758b3f1cc2012 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 21 Feb 2026 11:27:05 +0100 Subject: config.mk, make install --- configure | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'configure') 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 -- cgit v1.2.3