source: Main/trunk/bcc.sh@ 215

Last change on this file since 215 was 215, checked in by Nishi, on Oct 3, 2024 at 4:24:43 AM

can be compiled using bcc32 now

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#!/bin/sh
2# $Id: bcc.sh 215 2024-10-02 19:24:43Z nishi $
3# Wrapper for CL. VC6 sucks.
4
5outfile="a.out"
6dowhat=""
7options="-I../VC6Compat -tWM"
8obj=0
9source=""
10libraries=""
11link=""
12shared=0
13
14for 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 [ "`echo "$i" | grep -Eo "^-D"`" = "-D" ]; then
32 options="$options -`echo "$i" | sed "s/^-//g"`"
33 elif [ "`echo "$i" | grep -Eo "^-l"`" = "-l" ]; then
34 libraries="$libraries `echo "$i" | sed "s/^-l//g"`.lib"
35 elif [ "$dowhat" = "output" ]; then
36 dowhat=""
37 outfile="$i"
38 elif [ "$dowhat" = "include" ]; then
39 dowhat=""
40 options="$options -I$i"
41 elif [ ! "`echo "$i" | grep -Eo "^."`" = "-" ]; then
42 source="$source $i"
43 fi
44done
45if [ "$obj" = "1" ]; then
46 options="$options -o$outfile"
47else
48 options="$options -e$outfile"
49fi
50if [ ! "$libraries" = "" ]; then
51 link="$libraries"
52fi
53construct="bcc32 $options $source $link"
54echo "Run: $construct"
55$construct
Note: See TracBrowser for help on using the repository browser.