diff options
Diffstat (limited to 'apps/plugins/searchengine/Makefile')
-rw-r--r-- | apps/plugins/searchengine/Makefile | 10 |
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))) |
17 | endif | 17 | endif |
18 | 18 | ||
19 | ifeq ($(UNAME), Darwin) | ||
20 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
21 | else | ||
22 | SHARED_FLAG=-shared | ||
23 | endif | ||
24 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | 25 | LINKFILE := $(OBJDIR)/link.lds |
20 | DEPFILE = $(OBJDIR)/dep-searchengine | 26 | DEPFILE = $(OBJDIR)/dep-searchengine |
21 | SRC = searchengine.c parser.c token.c dbinterface.c | 27 | SRC = 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 $@ |
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 56 | ifeq ($(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 $@ |
66 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 72 | ifeq ($(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 |