Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4a82adf

Browse files
committedMar 27, 2013
DLL
1 parent c0b39ad commit 4a82adf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎lib/Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ VERSION=2.0.0
55
CC := $(patsubst cc,gcc,$(CC))
66

77
STATICLIB=libimagequant.a
8+
DLL=libimagequant.dll
9+
DLLIMP=libimagequant_dll.a
10+
DLLDEF=libimagequant_dll.def
811

912
CFLAGSOPT ?= -DNDEBUG -O3 -fstrict-aliasing -ffast-math -funroll-loops -fomit-frame-pointer -ffinite-math-only
1013

@@ -23,9 +26,15 @@ all: static
2326

2427
static: $(STATICLIB)
2528

29+
dll:
30+
$(MAKE) CFLAGSADD="-DLIQ_EXPORT='__declspec(dllexport)'" $(DLL)
31+
2632
openmp::
2733
$(MAKE) CFLAGSADD=-fopenmp OPENMPFLAGS="-Bstatic -lgomp" -j8 -$(MAKEFLAGS)
2834

35+
$(DLL) $(DLLIMP): $(OBJS)
36+
$(CC) -shared -o $(DLL) $(OBJS) $(LDFLAGS) -Wl,--out-implib,$(DLLIMP),--output-def,$(DLLDEF)
37+
2938
$(STATICLIB): $(OBJS)
3039
$(AR) $(ARFLAGS) $@ $^
3140

@@ -47,5 +56,5 @@ clean:
4756
build_configuration::
4857
@test -f build_configuration && test $(BUILD_CONFIGURATION) = "`cat build_configuration`" || echo > build_configuration $(BUILD_CONFIGURATION)
4958

50-
.PHONY: all openmp static clean dist
59+
.PHONY: all openmp static clean dist dll
5160
.DELETE_ON_ERROR:

0 commit comments

Comments
 (0)
Please sign in to comment.