mirror of
https://github.com/lexborisov/Modest
synced 2024-11-25 07:09:35 +03:00
Windows: fix shared library name and create import library
This commit is contained in:
parent
a465d36774
commit
0f873db54d
5
Makefile
5
Makefile
@ -7,6 +7,7 @@ CC ?= gcc
|
|||||||
LIBNAME := modest
|
LIBNAME := modest
|
||||||
LIBPOSTFIX := .so
|
LIBPOSTFIX := .so
|
||||||
LIBSTATIC_POSTFIX := _static
|
LIBSTATIC_POSTFIX := _static
|
||||||
|
IMP_FLAG :=
|
||||||
LIB_TMP := lib
|
LIB_TMP := lib
|
||||||
INCLUDE_TMP := include
|
INCLUDE_TMP := include
|
||||||
BIN_TMP := bin
|
BIN_TMP := bin
|
||||||
@ -34,6 +35,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
LIBPOSTFIX := .dll
|
||||||
|
IMP_FLAG := -Wl,--out-implib,$(LIB_TMP)/lib$(LIBNAME).dll.a
|
||||||
else
|
else
|
||||||
UNAM := $(shell uname -s)
|
UNAM := $(shell uname -s)
|
||||||
ifeq ($(UNAM),Darwin)
|
ifeq ($(UNAM),Darwin)
|
||||||
@ -58,7 +61,7 @@ include $(TARGET)/modest/Makefile.mk
|
|||||||
OBJS := $(patsubst %.c,%.o,$(SRCS))
|
OBJS := $(patsubst %.c,%.o,$(SRCS))
|
||||||
|
|
||||||
shared: $(OBJS)
|
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
|
static: shared
|
||||||
$(AR) crus $(LIB_TMP)/lib$(LIBNAME)$(LIBSTATIC_POSTFIX).a $(OBJS)
|
$(AR) crus $(LIB_TMP)/lib$(LIBNAME)$(LIBSTATIC_POSTFIX).a $(OBJS)
|
||||||
|
Loading…
Reference in New Issue
Block a user