source: Main/trunk/vc6.sh@ 235

Last change on this file since 235 was 222, checked in by Nishi, on Oct 3, 2024 at 12:09:40 PM

fix permission

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#!/bin/sh
2# $Id: vc6.sh 222 2024-10-03 03:09:40Z nishi $
3# Wrapper for CL. VC6 sucks.
4
5outfile="a.out"
6dowhat=""
7options="/I../VC6Compat"
8obj=0
9source=""
10libraries=""
11link=""
12
13for i in "$@"; do
14 if [ "$i" = "-o" ]; then
15 dowhat="output"
16 elif [ "$i" = "-I" ]; then
17 dowhat="include"
18 elif [ "$i" = "-c" ]; then
19 options="$options /c"
20 obj=1
21 elif [ "$i" = "-fPIC" ]; then
22 :
23 elif [ "$i" = "-g" ]; then
24 :
25 elif [ "$i" = "-std=c99" ]; then
26 :
27 elif [ "$i" = "-shared" ]; then
28 options="$options /LD"
29 elif [ "`echo "$i" | grep -Eo "^-D"`" = "-D" ]; then
30 options="$options /`echo "$i" | sed "s/^-//g"`"
31 elif [ "`echo "$i" | grep -Eo "^-l"`" = "-l" ]; then
32 libraries="$libraries `echo "$i" | sed "s/^-l//g"`.lib"
33 elif [ "$dowhat" = "output" ]; then
34 dowhat=""
35 outfile="$i"
36 elif [ "$dowhat" = "include" ]; then
37 dowhat=""
38 options="$options /I$i"
39 elif [ ! "`echo "$i" | grep -Eo "^."`" = "-" ]; then
40 source="$source $i"
41 fi
42done
43if [ "$obj" = "1" ]; then
44 options="$options /Fo$outfile"
45else
46 options="$options /Fe$outfile"
47fi
48if [ ! "$libraries" = "" ]; then
49 link="/link /nodefaultlib:libc $libraries"
50fi
51construct="cl /nologo $options $source $link"
52echo "Run: $construct"
53$construct
Note: See TracBrowser for help on using the repository browser.