summaryrefslogtreecommitdiff
path: root/preload/Makefile
diff options
context:
space:
mode:
authorLauri Leukkunen <lle@rahina.org>2007-10-30 18:57:10 +0200
committerLauri Leukkunen <lle@rahina.org>2007-10-30 18:57:10 +0200
commit805a59137992052912f0e365dc4271362f8262f3 (patch)
tree30625786496895b306a6b741795ec0f95108d8ff /preload/Makefile
parent00d7485195c7cb51f3d166e7188d9ff254b7ecf1 (diff)
Cleanup wrapper generation related build system stuff
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
Diffstat (limited to 'preload/Makefile')
-rw-r--r--preload/Makefile31
1 files changed, 14 insertions, 17 deletions
diff --git a/preload/Makefile b/preload/Makefile
index 8043021..409aedd 100644
--- a/preload/Makefile
+++ b/preload/Makefile
@@ -3,27 +3,24 @@ objs := wrappers.o libsb2.o sb_exec.o
PROTOTYPEWARNINGS=-Wmissing-prototypes -Wstrict-prototypes
$(D)/libsb2.so: $(call O,$(objs))
-
$(D)/libsb2.so: mapping/libmapping.a mapping/liblua.a
-
-$(D)/libsb2.so: CFLAGS := $(CFLAGS) -fPIC -Wall -W $(PROTOTYPEWARNINGS)
-$(D)/libsb2.so: LDFLAGS := $(LDFLAGS) -Wl,-soname=$(LIBSB2_SONAME) -Wl,--retain-symbols-file=preload/generated/ldexportlist
+$(D)/libsb2.so: CFLAGS := $(CFLAGS) -fPIC -Wall -W \
+ $(PROTOTYPEWARNINGS)
+$(D)/libsb2.so: LDFLAGS := $(LDFLAGS) -Wl,-soname=$(LIBSB2_SONAME) \
+ -Wl,--retain-symbols-file=$(D)/ldexportlist
$(D)/libsb2.so: LIBS := -ldl -lm -lpthread -lrt
targets := $(targets) $(D)/libsb2.so
+preload/wrappers.c: preload/interface.master preload/gen-interface.pl
+ $(P)PERL
+ $(Q)preload/gen-interface.pl \
+ -W preload/wrappers.c \
+ -E preload/exported.h \
+ -L preload/ldexportlist \
+ <preload/interface.master
-# "exported.h" will be created by the interface generator, too.
-preload/generated/exported.h: preload/wrappers.o
+generated = preload/wrappers.c preload/exported.h preload/ldexportlist
+.PRECIOUS: $(generated)
-preload/wrappers.o: preload/interface.master preload/gen-interface.pl
- if [ ! -d preload/generated ]; then mkdir preload/generated; fi
- echo "Expect to see one warning (about SCANDIR_TYPE_ARG3)"
- preload/gen-interface.pl \
- -W preload/generated/wrappers.c \
- -E preload/generated/exported.h \
- -L preload/generated/ldexportlist \
- <preload/interface.master
- $(CC) -I. -Ipreload -Iinclude -o preload/wrappers.o -c \
- $(PROTOTYPEWARNINGS) \
- preload/generated/wrappers.c
+CLEAN_FILES += $(generated)