mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 12:59:21 +08:00
d5a20f0b70
These subdirs have unique configure scripts to do some compiler tests. The checks should work for all targets, so hoist them up to the top libgloss dir. This should allow us to delete these subdir configure scripts. It means the top-level gains autoheader support, but that's fine. It wasn't exporting any defines previously (i.e. -D into CPPFLAGS), and all of the defines it now exports are only used by code in the libnosys subdir which was expecting to have a config.h.
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
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`
|
|
|
|
INCLUDES = -I. -I$(srcdir)/.. -I$(objdir)/..
|
|
# 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}
|
|
AR_FLAGS = rc
|
|
|
|
.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) $<
|