diff options
author | Paul Moore <pmoore@redhat.com> | 2012-02-23 15:15:46 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2012-02-23 15:15:46 -0500 |
commit | a7249dc7ec66ea521930081ff303a70f8066c9ad (patch) | |
tree | 684da59f2be24484769caeb58b68d4f70fe0e492 | |
parent | d0b432e69bacd73fa5abc0f722c52ae8f81c911f (diff) | |
download | libseccomp-a7249dc7ec66ea521930081ff303a70f8066c9ad.tar.gz |
tests: add the static library as a dependency
Also remove some unnecessary includes in the src/ and tests/ Makefiles.
Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | macros.mk | 23 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | tests/Makefile | 2 |
4 files changed, 23 insertions, 5 deletions
@@ -2,6 +2,7 @@ *.a *.o *.d +*.dtmp *.swp *.orig .stgit-* @@ -45,17 +45,36 @@ CFLAGS ?= -O0 -g -Wall LDFLAGS ?= -g # -# auto dependencies +# build tools # -# we require gcc specific functionality (see the MAKEDEP* definitions below) +MV ?= mv +CAT ?= cat +ECHO ?= echo + +SED ?= sed + +# we require gcc specific functionality (see the MAKEDEP definitions below) GCC ?= gcc +# +# auto dependencies +# + MAKEDEP = @$(GCC) $(INCFLAGS) -MM -MF $(patsubst %.o,%.d,$@) $<; MAKEDEP_EXEC = \ @$(GCC) $(INCFLAGS) -MM -MT $(patsubst %.d,%,$@) \ -MF $@ $(patsubst %.d,%.c,$@); +ADDDEP = \ + @adep() { \ + $(MV) $$1 $$1.dtmp; \ + $(CAT) $$1.dtmp | $(SED) -e 's/\([^\]\)$$/\1 \\/' | \ + ( $(CAT) - && $(ECHO) " $$2" ) > $$1; \ + $(RM) -f $@.dtmp; \ + }; \ + adep + # # build constants # diff --git a/src/Makefile b/src/Makefile index d8bff22..117ddfd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,8 +37,6 @@ LIB_SHARED = libseccomp.so.$(VERSION_RELEASE) OBJS = api.o db.o hash.o gen_pfc.o gen_bpf.o DEPS = $(OBJS:%.o=%.d) -INCFLAGS := $(INCFLAGS) -I../include - # # targets # diff --git a/tests/Makefile b/tests/Makefile index 3535581..0601e20 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -35,7 +35,6 @@ include ../macros.mk include ../version_info -INCFLAGS := $(INCFLAGS) -I../include LDFLAGS := ../src/libseccomp.a TESTS = 01-allow \ @@ -57,6 +56,7 @@ all: $(TESTS) $(DEPS): $(MAKEDEP_EXEC) + $(ADDDEP) $@ ../src/libseccomp.a $(TESTS): $(COMPILE_EXEC) |