summaryrefslogtreecommitdiff
path: root/preload/Makefile
diff options
context:
space:
mode:
authorLauri Leukkunen <lle@rahina.org>2007-12-18 06:08:51 +0200
committerLauri Leukkunen <lle@rahina.org>2007-12-18 06:08:51 +0200
commit4e95e703669b4cd4d2a3155db50266a70d1c0b26 (patch)
tree4303293296daa4a711f7541c174c328760ceac37 /preload/Makefile
parent233d0217288a379e1c2a1a596143ca246b7a3bf4 (diff)
Change wrapper generation to support multilib compilation
This is not tested properly on amd64 host, but does fix the obvious problems. Signed-off-by: Lauri Leukkunen <lle@rahina.org>
Diffstat (limited to 'preload/Makefile')
-rw-r--r--preload/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/preload/Makefile b/preload/Makefile
index 5518d53..a608cd9 100644
--- a/preload/Makefile
+++ b/preload/Makefile
@@ -17,7 +17,7 @@ endif
$(D)/libsb2.$(SHLIBEXT): $(call O,$(objs))
$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a luaif/liblua.a
$(D)/libsb2.$(SHLIBEXT): CFLAGS := $(CFLAGS) -fPIC -Wall -W \
- $(PROTOTYPEWARNINGS)
+ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS)
$(D)/libsb2.$(SHLIBEXT): LDFLAGS := $(LDFLAGS) $(LIBSB2_LDFLAGS)
$(D)/libsb2.$(SHLIBEXT): LIBS := -ldl -lm -lpthread $(LIBSB2_LIBS)
@@ -26,12 +26,13 @@ targets := $(targets) $(D)/libsb2.$(SHLIBEXT)
$(D)/libsb2.o $(D)/sb_exec.o: preload/exported.h
$(D)/exported.h $(D)/ldexportlist: preload/wrappers.c
$(D)/wrappers.c: preload/interface.master preload/gen-interface.pl
+ $(MKOUTPUTDIR)
$(P)PERL
- $(Q)preload/gen-interface.pl \
- -W preload/wrappers.c \
- -E preload/exported.h \
- -L preload/ldexportlist \
- <preload/interface.master
+ $(Q)$(SRCDIR)/preload/gen-interface.pl \
+ -W $(TOPDIR)/preload/wrappers.c \
+ -E $(TOPDIR)/preload/exported.h \
+ -L $(TOPDIR)/preload/ldexportlist \
+ <$(SRCDIR)/preload/interface.master
generated := preload/wrappers.c preload/exported.h preload/ldexportlist
.PRECIOUS: $(generated)