summaryrefslogtreecommitdiff
path: root/apps/plugins/searchengine/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/searchengine/Makefile')
-rw-r--r--apps/plugins/searchengine/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile
index 92e9f03991..d397f315f4 100644
--- a/apps/plugins/searchengine/Makefile
+++ b/apps/plugins/searchengine/Makefile
@@ -16,6 +16,12 @@ ifdef APPEXTRA
16 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 16 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
17endif 17endif
18 18
19ifeq ($(UNAME), Darwin)
20SHARED_FLAG=-dynamiclib -Wl,-single_module
21else
22SHARED_FLAG=-shared
23endif
24
19LINKFILE := $(OBJDIR)/link.lds 25LINKFILE := $(OBJDIR)/link.lds
20DEPFILE = $(OBJDIR)/dep-searchengine 26DEPFILE = $(OBJDIR)/dep-searchengine
21SRC = searchengine.c parser.c token.c dbinterface.c 27SRC = searchengine.c parser.c token.c dbinterface.c
@@ -46,7 +52,7 @@ ifeq ($(SIMVER), x11)
46 52
47$(OUTPUT): $(OBJS) 53$(OUTPUT): $(OBJS)
48 @echo "LD $<" 54 @echo "LD $<"
49 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 55 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 56ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
51# 'x' must be kept or you'll have "Win32 error 5" 57# 'x' must be kept or you'll have "Win32 error 5"
52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 58# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -62,7 +68,7 @@ ifeq ($(SIMVER), sdl)
62 68
63$(OUTPUT): $(OBJS) 69$(OUTPUT): $(OBJS)
64 @echo "LD $<" 70 @echo "LD $<"
65 @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ 71 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 72ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
67# 'x' must be kept or you'll have "Win32 error 5" 73# 'x' must be kept or you'll have "Win32 error 5"
68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 74# $ fgrep 5 /usr/include/w32api/winerror.h | head -1