Hi people, I am newbie at makefile writing, and I need help. Especialy with making autodependencies. I am starting to be desperate.
Since two days I am trying to write a makefile for SDCC compiler with autodependency feature. 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/html/make-w32/2002-07/msg00008.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 looks like this: 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 ***************************************************************************************************** EnOcean GmbH; Geschäftsführer / Managing Directors: Markus Brehler, Uwe Thumm Sitz der Gesellschaft / Registered Office: Oberhaching, Germany; Registergericht / Registered Court: München / Munich, HRB 139781 ***************************************************************************************************** _______________________________________________ Make-w32 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/make-w32
