Updated Makefile.in
[openjpeg.git] / Makefile.nix
index 7141cded19fca8636efd82c5d2f9b18eb1131ed9..5b5427be88b5a1edb8c4dd2d1b8fe0348d941923 100644 (file)
@@ -1,4 +1,4 @@
-#top Makefile
+#top Makefile.nix
 include  config.nix
 
 TARGET  = openjpeg
@@ -13,7 +13,6 @@ SRCS = ./libopenjpeg/bio.c ./libopenjpeg/cio.c ./libopenjpeg/dwt.c \
  ./libopenjpeg/mct.c ./libopenjpeg/mqc.c ./libopenjpeg/openjpeg.c \
  ./libopenjpeg/pi.c ./libopenjpeg/raw.c ./libopenjpeg/t1.c \
  ./libopenjpeg/t2.c ./libopenjpeg/tcd.c ./libopenjpeg/tgt.c \
- ./libopenjpeg/opj_convert.c
 
 INCLS = ./libopenjpeg/bio.h ./libopenjpeg/cio.h ./libopenjpeg/dwt.h \
  ./libopenjpeg/event.h ./libopenjpeg/fix.h ./libopenjpeg/image.h \
@@ -22,9 +21,7 @@ INCLS = ./libopenjpeg/bio.h ./libopenjpeg/cio.h ./libopenjpeg/dwt.h \
  ./libopenjpeg/mqc.h ./libopenjpeg/openjpeg.h ./libopenjpeg/pi.h \
  ./libopenjpeg/raw.h ./libopenjpeg/t1.h ./libopenjpeg/t2.h \
  ./libopenjpeg/tcd.h ./libopenjpeg/tgt.h ./libopenjpeg/opj_malloc.h \
- ./libopenjpeg/opj_convert.h ./libopenjpeg/opj_includes.h
-
-AR = ar
+ ./libopenjpeg/opj_includes.h
 
 INSTALL_LIBDIR = $(prefix)/lib
 headerdir = openjpeg-$(MAJOR).$(MINOR)
@@ -33,16 +30,6 @@ INSTALL_INCLUDE = $(prefix)/include/$(headerdir)
 # Converts cr/lf to just lf
 DOS2UNIX = dos2unix
 
-ifeq ($(WITH_LCMS1),yes)
-INCLUDE += $(LCMS1_INCLUDE)
-LIBRARIES += $(LCMS1_LIB)
-endif
-
-ifeq ($(WITH_LCMS2),yes)
-INCLUDE += $(LCMS2_INCLUDE)
-LIBRARIES += $(LCMS2_LIB)
-endif
-
 MODULES = $(SRCS:.c=.o)
 
 CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
@@ -59,12 +46,12 @@ default: all
 all: OpenJPEG
        make -C codec -f Makefile.nix all
        make -C mj2 -f Makefile.nix all
-
-jpwl-all:
+ifeq ($(WITH_JPWL),yes)
        make -C jpwl -f Makefile.nix all
-
-jp3d-all:
+endif
+ifeq ($(WITH_JP3D),yes)
        make -C jp3d -f Makefile.nix all
+endif
 
 dos2unix:
        @$(DOS2UNIX) $(SRCS) $(INCLS)
@@ -87,7 +74,7 @@ $(STATICLIB): $(MODULES)
 
 ifeq ($(ENABLE_SHARED),yes)
 $(SHAREDLIB): $(MODULES)
-       $(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
+       $(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
 endif
 
 install: OpenJPEG
@@ -101,7 +88,6 @@ ifeq ($(ENABLE_SHARED),yes)
        (cd $(DESTDIR)$(INSTALL_LIBDIR) && \
        ln -sf $(LIBNAME).so.$(MAJOR).$(MINOR) $(LIBNAME).so )
 endif
-       ldconfig
        install -d $(DESTDIR)$(INSTALL_INCLUDE)
        install -m 644 -o root -g root libopenjpeg/openjpeg.h \
        $(DESTDIR)$(INSTALL_INCLUDE)
@@ -109,19 +95,49 @@ endif
        ln -sf $(headerdir)/openjpeg.h openjpeg.h)
        make -C codec -f Makefile.nix install
        make -C mj2 -f Makefile.nix install
+ifeq ($(WITH_JPWL),yes)
+       make -C jpwl -f Makefile.nix install
+endif
+ifeq ($(WITH_JP3D),yes)
+       make -C jp3d -f Makefile.nix install
+endif
+       $(LDCONFIG)
+       make -C doc -f Makefile.nix install
+
+ifeq ($(WITH_JPWL),yes)
+jpwl-all:
+       make -C jpwl -f Makefile.nix all
 
-jpwl-install: jpwl
+jpwl-install: jpwl-all
        make -C jpwl -f Makefile.nix install
-       ldconfig
+       $(LDCONFIG)
 
-jp3d-install: jp3d
+jpwl-clean:
+       make -C jpwl -f Makefile.nix clean
+
+jpwl-uninstall:
+       make -C jpwl -f Makefile.nix uninstall
+endif
+
+ifeq ($(WITH_JP3D),yes)
+jp3d-all:
+       make -C jp3d -f Makefile.nix all
+
+jp3d-install: jp3d-all
        make -C jp3d -f Makefile.nix install
-       ldconfig
+       $(LDCONFIG)
+
+jp3d-clean:
+       make -C jp3d -f Makefile.nix clean
+
+jp3d-uninstall:
+       make -C jp3d -f Makefile.nix uninstall
+endif
 
 doc-all:
        make -C doc -f Makefile.nix all
 
-doc-install: docs
+doc-install: doc-all
        make -C doc -f Makefile.nix install
 
 clean:
@@ -129,12 +145,13 @@ clean:
        rm -f core u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB)
        make -C codec -f Makefile.nix clean
        make -C mj2 -f Makefile.nix clean
-
-jpwl-clean:
+       make -C doc -f Makefile.nix clean
+ifeq ($(WITH_JPWL),yes)
        make -C jpwl -f Makefile.nix clean
-
-jp3d-clean:
+endif
+ifeq ($(WITH_JP3D),yes)
        make -C jp3d -f Makefile.nix clean
+endif
 
 doc-clean:
        make -C doc -f Makefile.nix clean
@@ -145,14 +162,15 @@ ifeq ($(ENABLE_SHARED),yes)
        (cd $(DESTDIR)$(INSTALL_LIBDIR) && \
        rm -f $(LIBNAME).so $(LIBNAME).so.$(MAJOR).$(MINOR) $(SHAREDLIB) )
 endif
-       ldconfig
+       $(LDCONFIG)
        rm -f $(DESTDIR)$(prefix)/include/openjpeg.h
        rm -rf $(DESTDIR)$(INSTALL_INCLUDE)
        make -C codec -f Makefile.nix uninstall
        make -C mj2 -f Makefile.nix uninstall
-
-jpwl-uninstall:
+       make -C doc -f Makefile.nix uninstall
+ifeq ($(WITH_JPWL),yes)
        make -C jpwl -f Makefile.nix uninstall
-
-jp3d-uninstall:
+endif
+ifeq ($(WITH_JP3D),yes)
        make -C jp3d -f Makefile.nix uninstall
+endif