aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/external/gard/Makefile
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/external/gard/Makefile
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/external/gard/Makefile')
-rw-r--r--roms/skiboot/external/gard/Makefile43
1 files changed, 43 insertions, 0 deletions
diff --git a/roms/skiboot/external/gard/Makefile b/roms/skiboot/external/gard/Makefile
new file mode 100644
index 000000000..e249cf846
--- /dev/null
+++ b/roms/skiboot/external/gard/Makefile
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: Apache-2.0
+# This tool is a linux userland tool and should be completely stand alone
+include rules.mk
+GET_ARCH = ../../external/common/get_arch.sh
+include ../../external/common/rules.mk
+
+all: links arch_links $(EXE)
+
+.PHONY: coverage
+coverage: CFLAGS += -fprofile-arcs -ftest-coverage
+coverage: check
+
+#Rebuild version.o so that the the version always matches
+#what the test suite will get from ./make_version.sh
+check: version.o all
+ @ln -sf ../../make_version.sh make_version.sh
+ @ln -sf ../../test/test.sh test/test.sh
+ @test/test-gard
+
+.PHONY: VERSION-always
+.version: VERSION-always
+ @echo $(GARD_VERSION) > $@.tmp
+ @cmp -s $@ $@.tmp || cp $@.tmp $@
+ @rm -f $@.tmp
+
+.PHONY: dist
+#File is named $(GARD_VERSION).tar because the expectation is that gard-
+#is always at the start of the verion. This remains consistent with skiboot
+#version strings
+dist: arch_links links .version
+ @find -L ../gard/ -iname '*.[ch]' -print0 | xargs -0 tar -rhf $(GARD_VERSION).tar
+ @tar --transform 's/Makefile.dist/Makefile/' -rhf $(GARD_VERSION).tar \
+ ../gard/Makefile.dist ../gard/rules.mk \
+ ../gard/.version ../gard/common/*
+
+clean: arch_clean
+ rm -f $(OBJS) $(EXE) *.o *.d .version .version.tmp
+
+distclean: clean
+ rm -f *.c~ *.h~ *.sh~ Makefile~ config.mk~ libflash/*.c~ libflash/*.h~
+ rm -f libflash ccan common io.h version.c make_version.sh
+ rm -f gard-*.tar
+