Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lexborisov/Modest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2017-02-22 11:49:54 +0300
committerVincent Torri <vincent.torri@gmail.com>2017-02-22 11:49:54 +0300
commit0f873db54d7cd524623e1ce467957d164b7b30e0 (patch)
tree17149ad01e0364b3d700254d619b74bbe533ff6c /Makefile
parenta465d36774d16939aeb6f83f98dbdecbb5cea6e5 (diff)
Windows: fix shared library name and create import library
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7953a87..dc7be13 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ CC ?= gcc
LIBNAME := modest
LIBPOSTFIX := .so
LIBSTATIC_POSTFIX := _static
+IMP_FLAG :=
LIB_TMP := lib
INCLUDE_TMP := include
BIN_TMP := bin
@@ -34,6 +35,8 @@ else
endif
ifeq ($(OS),Windows_NT)
+ LIBPOSTFIX := .dll
+ IMP_FLAG := -Wl,--out-implib,$(LIB_TMP)/lib$(LIBNAME).dll.a
else
UNAM := $(shell uname -s)
ifeq ($(UNAM),Darwin)
@@ -58,7 +61,7 @@ include $(TARGET)/modest/Makefile.mk
OBJS := $(patsubst %.c,%.o,$(SRCS))
shared: $(OBJS)
- $(CC) -shared $(LDFLAGS) $(OBJS) -o $(LIB_TMP)/lib$(LIBNAME)$(LIBPOSTFIX)
+ $(CC) -shared $(IMP_FLAG) $(LDFLAGS) $(OBJS) -o $(LIB_TMP)/lib$(LIBNAME)$(LIBPOSTFIX)
static: shared
$(AR) crus $(LIB_TMP)/lib$(LIBNAME)$(LIBSTATIC_POSTFIX).a $(OBJS)