??? 01/11/07 13:52 Read: times |
#130637 - About inventing time in make... Responding to: ???'s previous message |
Hi people,
so I followed Andy Neils suggestions I am fighting with the makefile. And I am starting to be desperate. What I am having a problem is with generating the dependencies automaticly. I am using Windows so my hands are tied (no sed usage or awk). I've read plenty of posts and solution but neither of them works for me. 1. I have read http://make.paulandlesley.org/autodep.html but because of windows enviroment sed is not working. 2. Than I read http://lists.gnu.org/archive/h...00008.html but the shells are no more available so I was still unable to use sed. I have a huge project with lot of files in lot of different subdirectories. The SDCC has the feature to detect dependencies and write them to the file. What I need is a help to put all the stuff together so it works: My makefile till now looks like this (collecting dependencies to .d files): INCDIR = -IHAL/LL/sd_spi/sw/fw/drivers -IHAL/TL -IHAL/COMMON VPATH= HAL/Common;HAL/TL;HAL/LL/sd_spi/sw/fw/drivers COMPILER_PARAM = --model-small --vc --debug -V --use-stdout -o".\OutputSDCC\sdcctest.hex" LINKER_PARAM = --code-loc 0x0000 --data-loc 0x30 --stack-after-data --xram-loc 0x0000 COMPILER_C=sdcc COMPILER_ASM=asx8051 COMPILER_LIB=sdcclib SRCS=main.c spi.c test.c MAKEDEPEND = sdcc -M $< $(INCDIR) > $*.d %.rel : %.c $(MAKEDEPEND) $(COMPILER_C) $(COMPILER_PARAM) $(INCDIR) -c $< sdcctest.hex: main.rel spi.rel test.rel include $(SRCS:.c=.d) I could really apritiate if someone could help me or give me an example makefile how to put all the things together. greetings Attila |