-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigure
More file actions
executable file
·37 lines (33 loc) · 782 Bytes
/
Copy pathConfigure
File metadata and controls
executable file
·37 lines (33 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# Script to auto-configure splitvt. -Sam Lantinga
QUIET="-v"
# use $CC if set, else set it to cc
: ${CC:=cc}
CFLAGS=
MAKE="echo \"Done. Type 'make' to build\""
echo "Making configuration..."
while [ $# -gt 0 ]
do case $1 in
-d) CFLAGS=-DDEBUG
echo "Configuring for debug mode."
shift;;
-m) MAKE="echo Compiling now...; make && \
echo Compilation successfully completed."
shift;;
-q) QUIET=""
shift;;
*) echo "Usage: Configure [-q] [-d] [-m]"
exit;;
esac
done
$CC $CFLAGS -o config config.c
if [ -f config ]; then
if ./config $QUIET
then eval $MAKE
fi
else
echo "Can't compile configuration... Makefile NOT created."
exit 1
fi
rm -f config
exit 0