aboutsummaryrefslogtreecommitdiffstats
path: root/asn1c/tests/check-assembly.sh
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-08-11 05:26:29 +0000
committerLev Walkin <vlm@lionet.info>2004-08-11 05:26:29 +0000
commited2710d758f7fec6338a94f450c5e56c18babe32 (patch)
treeeaf62edd2343f4e7525bbdfd1fc98e20a2d77e60 /asn1c/tests/check-assembly.sh
parentb47ddce6c42098b345a6df528bcfc7fdc66948c9 (diff)
C++ testing
Diffstat (limited to 'asn1c/tests/check-assembly.sh')
-rwxr-xr-xasn1c/tests/check-assembly.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/asn1c/tests/check-assembly.sh b/asn1c/tests/check-assembly.sh
index a1756b4d..5a67ab66 100755
--- a/asn1c/tests/check-assembly.sh
+++ b/asn1c/tests/check-assembly.sh
@@ -9,7 +9,7 @@
source=$(echo "$1" | sed -e 's/.*\///')
testno=`echo "$source" | cut -f2 -d'-' | cut -f1 -d'.'`
-args=$(echo "$source" | sed -e 's/\.c$//')
+args=$(echo "$source" | sed -e 's/\.c[c]*$//')
testdir=test-${args}
OFS=$IFS
@@ -33,15 +33,20 @@ set +x
# Create a Makefile for the project.
cat > Makefile <<EOM
-CFLAGS=-I. -Wall -g ${CFLAGS} -DEMIT_ASN_DEBUG
-SRCS=`echo *.c`
-OBJS=\${SRCS:.c=.o}
+COMMON_FLAGS= -I. -Wall -g -DEMIT_ASN_DEBUG
+CFLAGS=\${COMMON_FLAGS} ${CFLAGS}
+CXXFLAGS=\${COMMON_FLAGS} ${CXXFLAGS}
+SRCS=`echo *.c*`
+OBJS1=\${SRCS:.c=.o}
+OBJS=\${OBJS1:.cc=.o}
check-executable: \${OBJS}
\${CC} \${CFLAGS} -o check-executable \${OBJS}
.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .c .cc .o
.c.o:
\${CC} \${CFLAGS} -o \$@ -c \$<
+.cc.o:
+ \${CXX} \${CXXFLAGS} -o \$@ -c \$<
check: check-executable
./check-executable
clean: