restored specific compilation option since SDCC seems not supporting -MDD very well

introduced a snprintf macro as empty function
This commit is contained in:
matsutsuka 2009-07-09 18:26:55 +00:00
parent 9a752dab15
commit c55d3ded6c
2 changed files with 10 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# Makefile for z80/SDCC # Makefile for z80/SDCC
# @author Takahide Matsutsuka <markn@markn.org> # @author Takahide Matsutsuka <markn@markn.org>
# #
# $Id: Makefile.z80,v 1.12 2009/07/02 22:36:35 oliverschmidt Exp $ # $Id: Makefile.z80,v 1.13 2009/07/09 18:26:55 matsutsuka Exp $
# #
### Compiler definitions ### Compiler definitions
@ -14,11 +14,12 @@ OBJCOPY = objcopy
STRIP = strip STRIP = strip
### Custom rules ### Custom rules
CUSTOM_RULE_C_TO_OBJECTDIR_O=1
CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1
CUSTOM_RULE_LINK=1 CUSTOM_RULE_LINK=1
### Default flags ### Default flags
CFLAGS += --std-c99 --vc -mz80 CFLAGS += --std-c99 -mz80
# --peep-file $(CONTIKI_CPU)/z80peephole.def # --peep-file $(CONTIKI_CPU)/z80peephole.def
ASFLAGS += ASFLAGS +=
LDFLAGS += -mz80 --out-fmt-ihx --no-std-crt0 LDFLAGS += -mz80 --out-fmt-ihx --no-std-crt0
@ -50,6 +51,10 @@ CONTIKI_PLATFORM_DIRS = $(PLATFORM_APPDIRS) \
#directives. (i.e. #define, etc.) #directives. (i.e. #define, etc.)
vpath %.cS $(CONTIKI_PLATFORM_DIRS) vpath %.cS $(CONTIKI_PLATFORM_DIRS)
#option -MMD doesn't work well on SDCC as of 2.9.0
$(OBJECTDIR)/%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
ifndef CUSTOM_RULE_CS_TO_OBJECTDIR_O ifndef CUSTOM_RULE_CS_TO_OBJECTDIR_O
$(OBJECTDIR)/%.o: %.cS $(OBJECTDIR)/%.o: %.cS
cp $< $(OBJECTDIR)/$*.c cp $< $(OBJECTDIR)/$*.c

View File

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* $Id: z80def.h,v 1.6 2008/07/02 15:02:33 matsutsuka Exp $ * $Id: z80def.h,v 1.7 2009/07/09 18:26:55 matsutsuka Exp $
* *
*/ */
@ -87,4 +87,6 @@ typedef unsigned int size_t;
#define uip_ipaddr_copy(dest, src) \ #define uip_ipaddr_copy(dest, src) \
memcpy(dest, src, sizeof(*dest)) memcpy(dest, src, sizeof(*dest))
#define snprintf(a...)
#endif /* __Z80_DEF_H__ */ #endif /* __Z80_DEF_H__ */