Sorry don't have time to look at this, but on this page you find my project complete with Makefile that should compile out of the box with SDCC so if you look at the Makefile it might help you.
http://www.sparetimelabs.com/usbcdcacm/usbcdcacm.php Below is the relevant part from that Makefile. cheers Kusti # The source files that make up the project go here SRCS = main.c usbcdc.c printft.c # The libraries that are used go here LIBS = libc18f.lib libio18f4550.lib libm18f.lib libsdcc.lib # Where to find the compiler SDCC = /Users/nyholku/sdcc-3.2.0/bin/sdcc # Compiler flags go here SDCCFLAGS = -V -L /Users/nyholku/sdcc-3.2.0/share/sdcc/non-free/lib/pic16 -Wl,-m,-s18f4550.lkr -mpic16 -p18f4550 --disable-warning 85 --std-sdcc99 --obanksel=3 --use-non-free # Where to store the target/intermediate/temporary/object files OBJDIR = ../obj # Compile the C-files $(OBJDIR)/%.o: %.c $$(@D)/.f $(SDCC) -c $(SDCCFLAGS) $< -o $@ # Link the compiled files and libraries $(OBJDIR)/$(TARGET): $(addprefix $(OBJDIR)/, $(SRCS:.c=.o)) $(SDCC) $(SDCCFLAGS) -o $(OBJDIR)/$(TARGET) $(addprefix $(OBJDIR)/, $(SRCS:.c=.o)) $(LIBS) > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user