/[tewi]/bcc.sh
ViewVC logotype

Annotation of /bcc.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations)
Sun Oct 20 20:39:35 2024 UTC (3 weeks, 4 days ago) by nishi
Branch: MAIN
CVS Tags: v2_05A, HEAD
Changes since 1.1: +2 -2 lines
Content type: application/x-sh
change bcc.sh

1 nishi 1.1 #!/bin/sh
2 nishi 1.2 # $Id: bcc.sh 391 2024-10-20 20:39:22Z nishi $
3     # Wrapper for BCC32.
4 nishi 1.1
5     outfile="a.out"
6     dowhat=""
7     options="-I../VC6Compat -tWM -I$BORLAND/Include -L$BORLAND/Lib"
8     obj=0
9     source=""
10     libraries=""
11     link=""
12     shared=0
13    
14     for i in "$@"; do
15     if [ "$i" = "-o" ]; then
16     dowhat="output"
17     elif [ "$i" = "-I" ]; then
18     dowhat="include"
19     elif [ "$i" = "-c" ]; then
20     options="$options -c"
21     obj=1
22     elif [ "$i" = "-fPIC" ]; then
23     :
24     elif [ "$i" = "-g" ]; then
25     :
26     elif [ "$i" = "-std=c99" ]; then
27     :
28     elif [ "$i" = "-shared" ]; then
29     options="$options -tWD"
30     shared=1
31     elif [ "$i" = "-mwindows" ]; then
32     options="$options -tW"
33     elif [ "`echo "$i" | grep -Eo "^-D"`" = "-D" ]; then
34     options="$options -`echo "$i" | sed "s/^-//g"`"
35     elif [ "`echo "$i" | grep -Eo "^-l"`" = "-l" ]; then
36     if [ ! "$i" = "-lwsock32" -a ! "$i" = "-luser32" -a ! "$i" = "-lcomctl32" ]; then
37     libraries="$libraries `echo "$i" | sed "s/^-l//g"`.lib"
38     fi
39     elif [ "$dowhat" = "output" ]; then
40     dowhat=""
41     outfile="$i"
42     elif [ "$dowhat" = "include" ]; then
43     dowhat=""
44     options="$options -I$i"
45     elif [ ! "`echo "$i" | grep -Eo "^."`" = "-" ]; then
46     source="$source $i"
47     fi
48     done
49     if [ "$obj" = "1" ]; then
50     options="$options -o$outfile"
51     else
52     options="$options -e$outfile"
53     fi
54     if [ ! "$libraries" = "" ]; then
55     link="$libraries"
56     fi
57     construct="bcc32 $options $source $link"
58     echo "Run: $construct"
59     $construct

nishi@chaotic.ninja
ViewVC Help
Powered by ViewVC 1.3.0-dev