mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-30 19:29:45 +00:00
77 lines
1.6 KiB
Makefile
77 lines
1.6 KiB
Makefile
-include *.u
|
|
|
|
.SECONDARY:
|
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/6502
|
|
|
|
INCLUDES=-I. -I$(CONTIKI_CPU) \
|
|
${addprefix -I$(CONTIKI)/platform/$(TARGET)/, . apps ctk lib loader net} \
|
|
${addprefix -I,$(APPDIRS)} -I$(CONTIKI)/core
|
|
|
|
|
|
CCDEP=gcc
|
|
CDEPFLAGS=$(INCLUDES)
|
|
|
|
CC=cc65
|
|
AS=ca65
|
|
LD=ld65
|
|
CL=cl65
|
|
|
|
PORTDIRS=apps conf ctk lib loader net
|
|
CONTIKICC65DIRS=${addprefix $(CONTIKI_CPU)/, apps lib loader net}
|
|
|
|
CFLAGSCC65=$(INCLUDES) \
|
|
-DWITH_PETSCII \
|
|
-t $(SYS) --add-source --create-dep
|
|
|
|
CLFLAGS=-Ln contiki-labels
|
|
|
|
OPT=-Or
|
|
|
|
#%.o: %.c
|
|
|
|
#%.s: %.c
|
|
# $(CC) $(CFLAGS) $(OPT) -o $(notdir $@) $<
|
|
|
|
#%.o: %.s
|
|
# $(AS) $(AFLAGS) -o $@ $<
|
|
|
|
#%.o: %.S
|
|
# $(AS) $(AFLAGS) -o $@ $<
|
|
|
|
$(OBJECTDIR)/%.o: %.c
|
|
$(CC) $(CFLAGS) $< -o $@
|
|
|
|
CONTIKI_TARGET_DIRS_CONCAT = ${addprefix $(CONTIKI)/platform/$(TARGET)/, \
|
|
$(CONTIKI_TARGET_DIRS)}
|
|
|
|
vpath %.c $(PROJECTDIRS) \
|
|
$(CONTIKIDIRS) $(APPDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \
|
|
$(CONTIKI_CPU)
|
|
|
|
vpath %.S $(PORTDIRS) $(CONTIKICC65DIRS) $(CONTIKIDIRS)
|
|
|
|
%.sav: %.o contiki-labels.o
|
|
cl65 --module -t $(SYS) -o $@ loader-arch-module.o $^
|
|
|
|
%.prg: %.o contiki-labels.o
|
|
cl65 --module -t $(SYS) -o $@ loader-arch-module.o $^
|
|
|
|
%.drv: %-drv.o contiki-labels.o
|
|
cl65 --module -t $(SYS) -o $@ loader-arch-module.o $^
|
|
|
|
%.drv: %.o contiki-labels.o
|
|
cl65 --module -t $(SYS) -o $@ loader-arch-module.o $^
|
|
|
|
%.dsc: %-dsc.o contiki-labels.o
|
|
cl65 --module -t $(SYS) -o $@ loader-arch-module-dsc.o $^
|
|
|
|
contiki-labels.s: contiki
|
|
./$(CONTIKI)/tools/cc65-make-labels
|
|
|
|
#clean:
|
|
# rm -f *.o *~ *core contiki *.map *.s *.u *.dsc *.prg *.drv *.sav contiki-labels
|
|
|
|
codesize:
|
|
od65 --dump-segsize *.o | egrep '\.o|CODE'
|