about summary refs log tree commit diff
path: root/converter/other/pnmtopalm/Makefile
blob: 7f99f95a7a2f6833894a37e46aa87d7e38c8d492 (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
ifeq ($(SRCDIR)x,x)
  SRCDIR = $(CURDIR)/../../..
  BUILDDIR = $(SRCDIR)
endif
SUBDIR = converter/other/pnmtopalm
VPATH=.:$(SRCDIR)/$(SUBDIR)

include $(BUILDDIR)/config.mk

BINARIES = palmtopnm pnmtopalm
SCRIPTS =
OBJECTS = $(BINARIES:%=%.o) palmcolormap.o
MERGE_OBJECTS = $(BINARIES:%=%.o2) palmcolormap.o
MERGEBINARIES = $(BINARIES)
DATAFILES = palmcolor8.map palmgray1.map palmgray2.map palmgray4.map

all: $(BINARIES)

include $(SRCDIR)/common.mk

LIBOPTS = $(shell $(LIBOPT) $(NETPBMLIB))

$(BINARIES): %: %.o palmcolormap.o $(NETPBMLIB) $(LIBOPT)
	$(LD) -o $@ $< palmcolormap.o $(LIBOPTS) \
	  $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)

gen_palm_colormap : % : %.c palmcolormap.o
	$(CC) -I importinc $(CPPFLAGS) $(CFLAGS) -o $@ \
	  $< palmcolormap.o \
	  $(LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(LADD)


clean: cleanspecial
.PHONY: cleanspecial
cleanspecial:
	rm -f gen_palm_colormap