diff options
author | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-07-07 15:17:16 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-07-07 15:17:16 -0700 |
commit | 43615c60e7d493d7a9656268dab552eb2246f99f (patch) | |
tree | 937685386f8119001f970c990df4821f90e37e94 /Makefile.in | |
parent | 8a45108918b080fe8f139f000e62b4e50a5185b8 (diff) | |
download | spike-43615c60e7d493d7a9656268dab552eb2246f99f.zip spike-43615c60e7d493d7a9656268dab552eb2246f99f.tar.gz spike-43615c60e7d493d7a9656268dab552eb2246f99f.tar.bz2 |
Use precompiled headers to speed up compilation
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index 1f3074d..45d22a4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,16 +184,20 @@ _$(1).cc : # Build the object files for this subproject +$(2)_pch := $$(patsubst %.h, %.h.gch, $$($(2)_precompiled_hdrs)) $(2)_objs := $$(patsubst %.cc, %.o, $$($(2)_srcs)) $(2)_c_objs := $$(patsubst %.c, %.o, $$($(2)_c_srcs)) $(2)_deps := $$(patsubst %.o, %.d, $$($(2)_objs)) $(2)_c_deps := $$(patsubst %.o, %.d, $$($(2)_c_objs)) -$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) +$$($(2)_pch) : %.h.gch : %.h + $(COMPILE) $$< +$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $$($(2)_pch) $(COMPILE) -c $$< $$($(2)_c_objs) : %.o : %.c $$($(2)_gen_hdrs) $(COMPILE_C) -c $$< -$(2)_junk += $$($(2)_objs) $$($(2)_c_objs) $$($(2)_deps) $$($(2)_c_deps) $$($(2)_gen_hdrs) +$(2)_junk += $$(addprefix $(src_dir)/$(1)/, $$($(2)_pch)) \ + $$($(2)_objs) $$($(2)_c_objs) $$($(2)_deps) $$($(2)_c_deps) $$($(2)_gen_hdrs) # Reverse the dependency list so that a given subproject only depends on # subprojects listed to its right. This is the correct order for linking |