aboutsummaryrefslogtreecommitdiffstats
path: root/examples/drivertest/make-files.sh
blob: 3941d332c7de81af1154051046d83b248c0da269 (plain)
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
#!/bin/sh
# Author: Christian Starkjohann
# Creation Date: 2008-04-17
# Tabsize: 4
# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
# This Revision: $Id$


if [ "$1" = remove ]; then
    (cd firmware; make clean)
    rm -rf firmware/usbdrv
    rm -f firmware/osccal.[ch]
    rm -f commandline/Makefile.windows
    rm -f commandline/Makefile
    rm -f commandline/opendevice.[ch]
    exit
fi

cat << \EOF | sed -n -f /dev/stdin ../usbtool/Makefile.windows >commandline/Makefile.windows
/^\( [*] \)\{0,1\}[+].*$/ d
s/^# Project: .*$/# Project: hid-custom-rq example/g
p
EOF

cat << \EOF | sed -n -f /dev/stdin ../usbtool/Makefile >commandline/Makefile
/^\( [*] \)\{0,1\}[+].*$/ d
s/^# Project: .*$/# Project: hid-custom-rq example/g
s/^NAME = .*$/NAME = runtest/g
p
EOF

cp ../../libs-host/opendevice.[ch] commandline/
cp ../../libs-device/osccal.[ch] firmware/