blob: 812bbbde94d5ea6aed00371ef986f2cffb7d582e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
ifeq ($(SRCDIR)x,x)
SRCDIR = $(CURDIR)/../../..
BUILDDIR = $(SRCDIR)
endif
SUBDIR = converter/other/jbig
VPATH=.:$(SRCDIR)/$(SUBDIR)
include $(BUILDDIR)/config.mk
LIBJBIG_OBJECTS = jbig.o jbig_tab.o
EXTERN_INCLUDES =
ifneq ($(JBIGHDR_DIR),NONE)
ifneq ($(JBIGHDR_DIR)x,x)
EXTERN_INCLUDES += -I$(JBIGHDR_DIR)
endif
endif
ifneq ($(JBIGHDR_DIR),NONE)
ifneq ($(JBIGLIB),NONE)
BINARIES = jbigtopnm pnmtojbig
endif
endif
SCRIPTS =
ifeq ($(JBIGLIB),$(BUILDDIR)/$(SUBDIR)/libjbig.a)
JBIGLIB_DEP = $(JBIGLIB)
else
# It's not our internal version; user's on his own to make sure it's built
endif
OBJECTS = $(BINARIES:%=%.o) $(LIBJBIG_OBJECTS)
MERGE_OBJECTS = $(BINARIES:%=%.o2) $(LIBJBIG_OBJECTS)
all: $(BINARIES)
include $(SRCDIR)/common.mk
$(BINARIES): %: %.o $(JBIGLIB_DEP) $(NETPBMLIB) $(LIBOPT)
$(LD) -o $@ $< \
$(shell $(LIBOPT) $(NETPBMLIB) $(JBIGLIB)) $(MATHLIB) \
$(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)
$(BUILDDIR)/$(SUBDIR)/libjbig.a: $(LIBJBIG_OBJECTS)
$(AR) -rc $@ $^
$(RANLIB) $@
|