diff options
Diffstat (limited to 'converter/other/jpeg2000/Makefile')
-rw-r--r-- | converter/other/jpeg2000/Makefile | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/converter/other/jpeg2000/Makefile b/converter/other/jpeg2000/Makefile index f4fee87f..6e5af8e7 100644 --- a/converter/other/jpeg2000/Makefile +++ b/converter/other/jpeg2000/Makefile @@ -5,21 +5,23 @@ endif SUBDIR = converter/other/jpeg2000 VPATH=.:$(SRCDIR)/$(SUBDIR) -SUBDIRS = libjasper +SUBDIRS = include $(BUILDDIR)/config.mk EXTERN_INCLUDES = -ifneq ($(JASPERHDR_DIR),NONE) - EXTERN_INCLUDES += -I$(JASPERHDR_DIR) -endif - # INTERNAL_JASPERLIB must be relative to the current directory, because it # may end up in MERGE_OBJECTS, which must be relative. INTERNAL_JASPERLIB = libjasper/libjasper.a INTERNAL_JASPERHDR_DIR = $(SRCDIR)/$(SUBDIR)/libjasper/include +ifneq ($(JASPERHDR_DIR),NONE) + ifneq ($(JASPERHDR_DIR)x,x) + EXTERN_INCLUDES += -I$(JASPERHDR_DIR) + endif +endif + ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB)) ifeq ($(HAVE_INT64),Y) JASPERLIB_DEP = $(JASPERLIB) @@ -38,17 +40,19 @@ endif ifneq ($(JASPERHDR_DIR),NONE) ifneq ($(JASPERLIB_USE),NONE) - BINARIES = pamtojpeg2k jpeg2ktopam + PORTBINARIES = pamtojpeg2k jpeg2ktopam endif endif +BINARIES = $(PORTBINARIES) OBJECTS = $(BINARIES:%=%.o) MERGE_OBJECTS = $(BINARIES:%=%.o2) ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB)) # MERGE_OBJECTS contains relative paths, so $(INTERNAL_JASPERLIB) had better - # be relative to the current relative to the current directory. + # be relative to the current directory. MERGE_OBJECTS += $(JASPERLIB) + SUBDIRS += libjasper endif MERGEBINARIES = $(BINARIES) @@ -57,12 +61,10 @@ all: $(BINARIES) include $(SRCDIR)/common.mk -LIBOPTS = $(shell $(LIBOPT) $(NETPBMLIB) $(JASPERLIB_USE)) +LIBOPTS = $(shell $(LIBOPT) $(JASPERLIB_USE)) -$(BINARIES): %: %.o $(JASPERLIB_DEP) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $< \ - $(LIBOPTS) $(JASPERDEPLIBS) $(MATHLIB) $(RPATH) \ - $(LDFLAGS) $(LDLIBS) $(LADD) +$(BINARIES): %: %.o $(JASPERLIB_DEP) $(LIBOPT) +$(BINARIES): LDFLAGS_TARGET = $(LIBOPTS) $(JASPERDEPLIBS) $(INTERNAL_JASPERLIB): $(BUILDDIR)/$(SUBDIR)/libjasper FORCE $(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjasper/Makefile \ |