The suffix for preprocessed assembler file has been changed from ".hS" to ".cS"

This commit is contained in:
matsutsuka 2007-09-19 12:41:33 +00:00
parent 23b9136e5e
commit 7b402d38f8

View file

@ -2,7 +2,7 @@
# Makefile for z80/SDCC
# @author Takahide Matsutsuka <markn@markn.org>
#
# $Id: Makefile.z80,v 1.6 2007/09/11 12:11:38 matsutsuka Exp $
# $Id: Makefile.z80,v 1.7 2007/09/19 12:41:33 matsutsuka Exp $
#
### Compiler definitions
@ -21,7 +21,7 @@ CUSTOM_RULE_LINK=1
### Default flags
CFLAGS += --std-c99 --vc -mz80
ASFLAGS += -l
ASFLAGS +=
LDFLAGS +=
AROPTS = -a
@ -30,23 +30,23 @@ CONTIKI_CPU_DIRS = . dev lib
### CPU-dependent source files
CONTIKI_SOURCEFILES += strcasecmp.c mtarch.c uip_arch.c \
libconio_arch.c log-conio.c rs232.c rs232-slip.c
libconio_z80.c log-conio.c rs232.c rs232-slip.c
CONTIKI_ASMFILES += uip_arch-asm.S
CONTIKI_HASMOBJECTFILES = ${addprefix $(OBJECTDIR)/,$(CONTIKI_HASMFILES:.hS=.o)}
CONTIKI_CASMOBJECTFILES = ${addprefix $(OBJECTDIR)/,$(CONTIKI_CASMFILES:.cS=.o)}
CONTIKI_PLATFORM_DIRS = $(PLATFORM_APPDIRS) \
${addprefix $(CONTIKI)/platform/$(TARGET)/, $(CONTIKI_TARGET_DIRS)}
#".hS" suffix means assembler file with #include directive
#".cS" suffix means assembler file with #include directive
#so that a developer can use definitions of C-style include file
#in assembler file. Make sure the header file contains only compiler
#directives. (i.e. #define, etc.)
vpath %.hS $(CONTIKI_PLATFORM_DIRS)
vpath %.cS $(CONTIKI_PLATFORM_DIRS)
ifndef CUSTOM_RULE_HS_TO_OBJECTDIR_O
$(OBJECTDIR)/%.o: %.hS
ifndef CUSTOM_RULE_CS_TO_OBJECTDIR_O
$(OBJECTDIR)/%.o: %.cS
cp $< $(OBJECTDIR)/$*.c
$(CC) $(CFLAGS) -E $(OBJECTDIR)/$*.c > $(OBJECTDIR)/tmp
perl -pe "s/^#(.*)/;$$1/" $(OBJECTDIR)/tmp > $(OBJECTDIR)/$*.S
@ -55,7 +55,7 @@ $(OBJECTDIR)/%.o: %.hS
endif
#CUSTOM_RULE_ALLOBJS_TO_TARGETLIB
contiki-$(TARGET).a: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_HASMOBJECTFILES)
contiki-$(TARGET).a: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES)
for target in $^; do $(AR) $(AROPTS) $@ $$target; done
#CUSTOM_RULE_LINK