skipping header file depency
Taco Walstra <walstra-FT9nftu9LUxX9el/[email protected]> Mon, 7 Jun 2004 16:41:11 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Organization | University of Amsterdam |
| Message-ID | <[email protected]> |
hello,
Perhaps somebody could help with the following.
I'm trying to convert some makefiles into aap recipes for microcontroller
applications which should be compiled with a windows commandline compiler
with the linux wine emulator.
Because this compiler cannot generate dependencies I run both the linux
compiler and the uC compiler on the files.
One header files gives problems because of several preprocessor directives and
I would like to skip the dep. checking on this file. How to do this?
I've 2 recipes. One is a generic directory with c files and the application
directory contains a symbolic link to this directory (gen). This directory
contains the header file which I would like to skip.
Other comments are also welcome. It's my first start, so perhaps many things
can be improved.
Taco Walstra
This generic recipe is as follows:
UCCFLAGS = -O\( -OB -V -OZ -OE -OH -E -Isoftools/include -W760 -W782 -W757
-Igen
BDIR = generic
:action depend c
:sys $CC -MM $source > $target
:sys wine -- softools/SC2000.exe $?UCCFLAGS $source
genfiles =
adc.c
alert.c
board_id.c
bootp.c
.....
ISRHandler_c.c
ucosfiles =
os_core.c
.......
os_time.c
:attr ucos_ii.h {autodepend = off}
# This doesn't work!!!!!!
_top.Gen_obj = $ucosfiles $genfiles
all : $_top.Gen_obj
The other recipe contains several steps: it generates a file items.c from a
xml file. And every c files is compiled twice: one time for depencies and a
crosscompilation. Linking is again separate.
#A-A-P recipe for compiling ali-user board application
#T. Walstra, june 2004
#$Id: main.aap,v 1.3 2004/06/04 10:22:13 walstra Exp $
:child gen/main.aap # the generic uC files
UCCFLAGS = -O\( -OB -V -OZ -OE -OH -E -Isoftools/include -W760 -W782 -W757
-Igen
BDIR = ali_user
FPGAFILE = Ali_UsrFpga_v13.bin
:filetype
suffix xml xml
:action compile xml
:print Generating items.c and items.h ...
:sys ../../ins-capabilities/xml_convert $source DONTCARE 1
:print compiling items.c
:sys wine -- softools/SC2000.exe $?UCCFLAGS items.c
#:action depend c
# :print Compiling ...
# :sys $CC -MM $source > $target
# :sys wine -- softools/SC2000.exe $?UCCFLAGS $source
:action depend c
:sys $CC -MM -Igen $source > $target
:sys wine -- softools/SC2000.exe $?UCCFLAGS $source
:action build default
:print Linking ...
:sys wine -- softools/SLINK.exe @rabbit.lnk
items.c : ali-user.xml
:do compile $source
cfiles = items.c ali-user-spec.c gen/$*Gen_obj
all : rabbit.mot
rabbit.mot : $cfiles ali-user.xml
:do compile $source
:do build rabbit.lnk
--
------------------------------
drs. ing. Taco Walstra
University of Amsterdam
Faculty of Science
Valckenierstraat 65
1018 XE Amsterdam
Netherlands
0031-20-525 5730
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504