diff options
Diffstat (limited to 'sim/Makefile.am')
-rw-r--r-- | sim/Makefile.am | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sim/Makefile.am b/sim/Makefile.am index e47244d..3c46925 100644 --- a/sim/Makefile.am +++ b/sim/Makefile.am @@ -41,15 +41,27 @@ BUILT_SOURCES = CLEANFILES = DISTCLEANFILES = MOSTLYCLEANFILES = core - -AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS) +## We build some objects ourselves directly that Automake doesn't track, so +## make sure all objects in subdirs get cleaned up. +MOSTLYCLEANFILES += $(SIM_ENABLED_ARCHES:%=%/*.o) + +AM_CFLAGS = \ + $(WERROR_CFLAGS) \ + $(WARN_CFLAGS) \ + $(AM_CFLAGS_$(subst -,_,$(@D))) \ + $(AM_CFLAGS_$(subst -,_,$(@D)_$(@F))) AM_CPPFLAGS = \ $(INCGNU) \ + -I$(srcroot) \ -I$(srcroot)/include \ -I../bfd \ -I.. \ + -I$(@D) \ + -I$(srcdir)/$(@D) \ $(SIM_HW_CFLAGS) \ - $(SIM_INLINE) + $(SIM_INLINE) \ + $(AM_CPPFLAGS_$(subst -,_,$(@D))) \ + $(AM_CPPFLAGS_$(subst -,_,$(@D)_$(@F))) AM_CPPFLAGS_FOR_BUILD = \ -I$(srcroot)/include \ |