diff --git a/win/Makefile b/win/Makefile index ebcc43df..76dcf80f 100755 --- a/win/Makefile +++ b/win/Makefile @@ -174,7 +174,10 @@ wrjpgcom.exe: wrjpgcom.obj jpeg.lib turbojpeg-static.lib: turbojpegl.obj $(LOBJS) $(AR) -out:$@ $^ -turbojpeg.dll turbojpeg.lib: turbojpegl.obj $(LOBJS) +turbojpeg-dll.obj: turbojpegl.c + $(CC) $(CFLAGS) -DDLLDEFINE -c $< -Fo$@ + +turbojpeg.dll turbojpeg.lib: turbojpeg-dll.obj $(LOBJS) $(LINK) $(LDFLAGS) -dll -out:turbojpeg.dll -implib:turbojpeg.lib $^ diff --git a/win/Makerules b/win/Makerules index f4e18cdf..f122593b 100755 --- a/win/Makerules +++ b/win/Makerules @@ -9,7 +9,7 @@ ifeq ($(NASM),) NASM = nasm endif -CFLAGS = -W3 -wd4996 -Iwin -I. -DDLLDEFINE +CFLAGS = -W3 -wd4996 -Iwin -I. CDEFINES = -DWIN32 -D_CRT_SECURE_NO_DEPRECATE NAFLAGS = -fwin32 -DWIN32 -Iwin/ ifeq ($(DEBUG), yes)