diff options
author | 2023-02-07 12:34:44 +0100 | |
---|---|---|
committer | 2023-02-07 12:34:44 +0100 | |
commit | 479b2ee8e0cc52c3e76c7c09d0dfa5d902e50ec5 (patch) | |
tree | 5ff7555d0d031a6885f257708a0e2d3d84455162 /makemk | |
parent | 7d5553e60f29b0d2c5d1981e836fe57708071eeb (diff) | |
download | string2-479b2ee8e0cc52c3e76c7c09d0dfa5d902e50ec5.tar.gz string2-479b2ee8e0cc52c3e76c7c09d0dfa5d902e50ec5.zip |
Rewrite build system
Diffstat (limited to 'makemk')
-rwxr-xr-x | makemk | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ +#!/bin/sh + +MKFILE=target.mk +SRCDIR=src/ +ARDIR=bin/archive/ +SHDIR=bin/shared/ + +cat > $MKFILE << EOF +# See LICENSE file for copyright and license details. + +EOF + +for srcf in `find $SRCDIR -name '*.c'` +do + TARGETAR=`echo $srcf | sed -E "s|$SRCDIR(.*).c|$ARDIR\1.o|"` + TARGETSH=`echo $srcf | sed -E "s|$SRCDIR(.*).c|$SHDIR\1.o|"` + LINEAR='${CC} ${CFLAGS} -c '$srcf' -o $@' + LINESH='${CC} ${CFLAGS} -fPIC -c '$srcf' -o $@' + +cat >> $MKFILE << EOF +$TARGETAR: $srcf + $LINEAR + +$TARGETSH: $srcf + $LINESH + +EOF + +done |