2000-03-18 06:48:54 +08:00
|
|
|
NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
|
|
|
|
NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
|
|
|
|
|
2022-12-14 16:20:32 +08:00
|
|
|
INCLUDES = -I. -I$(srcdir)/.. -I$(objdir)/.. -idirafter $(srcroot)/include
|
2000-03-18 06:48:54 +08:00
|
|
|
# Note that when building the library, ${MULTILIB} is not the way multilib
|
|
|
|
# options are passed; they're passed in $(CFLAGS).
|
|
|
|
CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
|
|
|
|
LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
|
2012-03-13 09:47:40 +08:00
|
|
|
AR_FLAGS = rc
|
2000-03-18 06:48:54 +08:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
|
|
|
|
|
|
|
|
.C.o:
|
|
|
|
$(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
|
|
|
|
.s.o:
|
|
|
|
$(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
|
|
|
|
|
|
|
|
#
|
|
|
|
# GCC knows to run the preprocessor on .S files before it assembles them.
|
|
|
|
#
|
|
|
|
.S.o:
|
|
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
|
|
|
|
|
|
|
|
#
|
|
|
|
# this is a bogus target that'll produce an assembler from the
|
|
|
|
# C source with the right compiler options. this is so we can
|
|
|
|
# track down code generation or debug symbol bugs.
|
|
|
|
#
|
|
|
|
.c.s:
|
|
|
|
$(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $<
|
2022-01-17 17:12:11 +08:00
|
|
|
|
|
|
|
# We don't build docs in subdirs, so stub out the rules.
|
|
|
|
.PHONY: doc docs dvi html install-html info install-info clean-info pdf install-pdf
|