From 6223271f798d011ff20e28f1dcbb49892021c09d Mon Sep 17 00:00:00 2001 From: Jeroen Koekkoek Date: Fri, 19 Jul 2024 09:54:51 +0200 Subject: [PATCH 1/2] Remove export header in clean target --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 5cf81a7..27fd246 100644 --- a/Makefile.in +++ b/Makefile.in @@ -37,7 +37,7 @@ all: libzone.a clean: @rm -f .depend - @rm -f libzone.a $(OBJECTS) + @rm -f libzone.a $(OBJECTS) $(EXPORT_HEADER) distclean: clean @rm -f Makefile config.h config.log config.status From 94dd8a0c376242b7639b60fa3d66a86f4f2880a9 Mon Sep 17 00:00:00 2001 From: Jeroen Koekkoek Date: Fri, 19 Jul 2024 09:58:48 +0200 Subject: [PATCH 2/2] Make objects depend on export header NSD builds in Gentoo use --shuffle to randomly alter build order to test target dependencies. As the export header was a dependency of the link target and not the objects the export header might not be available during compilation. Fixes #216. --- Makefile.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 27fd246..0ebcf28 100644 --- a/Makefile.in +++ b/Makefile.in @@ -50,22 +50,22 @@ maintainer-clean: realclean devclean: @rm -rf config.h.in configure -libzone.a: $(EXPORT_HEADER) $(OBJECTS) $($(WESTMERE)_OBJECTS) $($(HASWELL)_OBJECTS) +libzone.a: $(OBJECTS) $($(WESTMERE)_OBJECTS) $($(HASWELL)_OBJECTS) $(AR) rcs libzone.a $(OBJECTS) $($(WESTMERE)_OBJECTS) $($(HASWELL)_OBJECTS) $(EXPORT_HEADER): @mkdir -p include/zone @echo "#define ZONE_EXPORT" > include/zone/export.h -$(WESTMERE_OBJECTS): .depend +$(WESTMERE_OBJECTS): $(EXPORT_HEADER) .depend @mkdir -p src/westmere $(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) -march=westmere -o $@ -c $(SOURCE)/$(@:.o=.c) -$(HASWELL_OBJECTS): .depend +$(HASWELL_OBJECTS): $(EXPORT_HEADER) .depend @mkdir -p src/haswell $(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) -march=haswell -o $@ -c $(SOURCE)/$(@:.o=.c) -$(OBJECTS): .depend +$(OBJECTS): $(EXPORT_HEADER) .depend @mkdir -p src/fallback $(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) -o $@ -c $(SOURCE)/$(@:.o=.c) @touch $@