Hello, I tried to write a Makefile for use with sdcc 2.9.0 to compile multifile z80 projects.
> # apps > CC := sdcc > AS := as-z80 > LD := link-z80 > > # segment base > SEG_CODE := 0x8000 > SEG_DATA := 0xd600 > > # flags > CC_FLAGS := -mz80 --no-reg-params --no-std-crt0 -V --verbose > LD_FLAGS := -b _CODE=$(SEG_CODE) -b _DATA=$(SEG_DATA) -i > AS_FLAGS := -g > > ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## > ## > PRJ_MAIN := testapp.c > > C_SRCS := src/$(PRJ_MAIN) > > ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## > ## > PRJ_OUTP := $(subst .c,,$(PRJ_MAIN)) > > PRJ_HEAD := $(wildcard ./src/*.h) > > PRJ_OBJS := $(patsubst %.c,.obj/%.o,$(C_SRCS)) > > ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## > ## > all: $(PRJ_OUTP) > > .obj/%.o : %.c $(PRJ_HEAD) > @-mkdir -p $(dir $@) > $(CC) $(CC_FLAGS) -c $< -o $@ > > $(PRJ_OUTP) : $(PRJ_OBJS) > $(LD) -- $(LD_FLAGS) $@ $(PRJ_OBJS) > > clean: > -rm $(PRJ_OBJS) > -rm $(PRJ_OUTP).bin but the linker complains about "invalid file type" and I don't know why. Could someone help me please? Greetings Arthur S. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user