From: Scott Beamer Date: Sun, 14 Sep 2014 16:10:28 +0000 (-0700) Subject: now can build with clang X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f9ce874eb3efbce4272abbbd7fb6d17cb258cbc;p=riscv-isa-sim.git now can build with clang on os x, clang needs different flags than gcc to generate and use precompiled headers --- diff --git a/Makefile.in b/Makefile.in index 7bbf1d8..c3f7dc0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -191,7 +191,8 @@ $(2)_deps := $$(patsubst %.o, %.d, $$($(2)_objs)) $(2)_c_deps := $$(patsubst %.o, %.d, $$($(2)_c_objs)) $$($(2)_pch) : %.h.gch : %.h $(COMPILE) $$< -$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $$($(2)_pch) +# If using clang, don't depend (and thus don't build) precompiled headers +$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $(if $(filter-out clang,$(CC)),$$($(2)_pch)) $(COMPILE) -c $$< $$($(2)_c_objs) : %.o : %.c $$($(2)_gen_hdrs) $(COMPILE_C) -c $$<