4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-23 17:19:33 +08:00

libgloss: add per-file & per-dir flag support

This logic is copied from what's used in newlib today.  This allows
subdirs to easily define per-directory flags & per-file flags without
having to setup unique automake rules for each one.
This commit is contained in:
Mike Frysinger 2023-12-29 20:34:38 -05:00
parent 6a1b0abc3d
commit 616db3e80c
2 changed files with 11 additions and 2 deletions

View File

@ -24,7 +24,11 @@ includetool_DATA =
includesystooldir = $(tooldir)/include/sys includesystooldir = $(tooldir)/include/sys
includesystool_DATA = includesystool_DATA =
AM_CPPFLAGS = -idirafter $(srcroot)/include # These are useful for standalone object files like crt0.o.
AM_CFLAGS = $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D)_$(<F)))
AM_CCASFLAGS = $(AM_CCASFLAGS_$(subst /,_,$(@D))) $(AM_CCASFLAGS_$(subst /,_,$(@D)_$(<F)))
AM_CPPFLAGS = $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F))) -idirafter $(srcroot)/include
AM_LDFLAGS = $(AM_LDFLAGS_$(subst /,_,$(@D))) $(AM_LDFLAGS_$(subst -,_,$(subst /,_,$(@D)_$(@F))))
# A fake library so automake will generate rules for plain objects that we want # A fake library so automake will generate rules for plain objects that we want
# to install (e.g. our crt0.o objects). # to install (e.g. our crt0.o objects).

View File

@ -913,7 +913,12 @@ includetooldir = $(tooldir)/include
includetool_DATA = $(am__append_16) includetool_DATA = $(am__append_16)
includesystooldir = $(tooldir)/include/sys includesystooldir = $(tooldir)/include/sys
includesystool_DATA = $(am__append_17) includesystool_DATA = $(am__append_17)
AM_CPPFLAGS = -idirafter $(srcroot)/include
# These are useful for standalone object files like crt0.o.
AM_CFLAGS = $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D)_$(<F)))
AM_CCASFLAGS = $(AM_CCASFLAGS_$(subst /,_,$(@D))) $(AM_CCASFLAGS_$(subst /,_,$(@D)_$(<F)))
AM_CPPFLAGS = $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F))) -idirafter $(srcroot)/include
AM_LDFLAGS = $(AM_LDFLAGS_$(subst /,_,$(@D))) $(AM_LDFLAGS_$(subst -,_,$(subst /,_,$(@D)_$(@F))))
# A fake library so automake will generate rules for plain objects that we want # A fake library so automake will generate rules for plain objects that we want
# to install (e.g. our crt0.o objects). # to install (e.g. our crt0.o objects).