Adapted Makefile.am/Makefile.nix to build choice: shared xor static
[openjpeg.git] / jpwl / Makefile.am
index 70afa456af5c7dcbf4997ecd84b80efa8a0bfc9f..fd1c953d1d4f926c53566f06e74a6f52422590cd 100644 (file)
@@ -69,9 +69,11 @@ bin_PROGRAMS = JPWL_j2k_to_image JPWL_image_to_j2k
 JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
 JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
 
-if with_staticlibs
-JPWL_j2k_to_image_CFLAGS += -static
-JPWL_image_to_j2k_CFLAGS += -static
+if with_sharedlibs
+COMPILERFLAGS += -DOPJ_EXPORTS
+else
+COMPILERFLAGS += -DOPJ_STATIC
+libopenjpeg_JPWL_la_LDFLAGS += -static
 endif
 
 CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL