diff options
author | David Seifert <soap@gentoo.org> | 2021-09-01 16:53:17 +0200 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2021-09-01 19:17:05 -0700 |
commit | 2762c2c1a8c98d9012fcd40f20d133493a0b3219 (patch) | |
tree | 7b72d2b1c2660fed4549bc843d8fca58c530627d /libcap | |
parent | 41f065cdc95f8bbe79ccba94cff20cd5434f7d2a (diff) | |
download | libcap-2762c2c1a8c98d9012fcd40f20d133493a0b3219.tar.gz |
Canonicalize build system
* Respect user's CFLAGS/CPPFLAGS/LDFLAGS
* Respect $(MAKE)
* Remove CPPFLAGS from link rules
Note: for in-tree built test binaries, where we build --static,
we do not apply LDFLAGS: we want to limit external
dependencies in general; and users' LDFLAGS have a strong
tendency to conflict with --static for linking.
Work in collaboration with David Seifert (ie, he wrote most of it).
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'libcap')
-rw-r--r-- | libcap/Makefile | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libcap/Makefile b/libcap/Makefile index 399aa66..4b96a0c 100644 --- a/libcap/Makefile +++ b/libcap/Makefile @@ -104,9 +104,6 @@ $(STAPSXLIBNAME): $(PSXOBJS) include/sys/psx_syscall.h ifeq ($(SHARED),yes) -empty: empty.c - $(CC) -o $@ $< - loader.txt: empty $(OBJCOPY) --dump-section .interp=$@ $< /dev/null @@ -134,7 +131,7 @@ cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS) $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ cap_test: cap_test.c libcap.h $(CAPOBJS) - $(CC) $(CFLAGS) $(CPPFLAGS) $< $(CAPOBJS) -o $@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< $(CAPOBJS) -o $@ libcapsotest: $(CAPLIBNAME) ./$(CAPLIBNAME) |