summaryrefslogtreecommitdiff
path: root/dviware/mdvi/x11/Makefile.in
blob: b53678361e939a9d06d2f15aa2c20a95d92efd23 (plain)
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
50
51
52
53
54
55
56
57
58
59
60

srcdir = @srcdir@
VPATH  = @srcdir@

-include ../config.mk

OBJS	= dvi.o dvidraw.o x11.o
SOURCES = dvi.c dvidraw.c x11.c
HEADERS = x11.h
OTHERFILES = Makefile.in

INCLUDES = -I$(srcdir) -I.. -I$(srcdir)/../include
LOCAL_CFLAGS = $(INCLUDES) $(KPSE_CFLAGS) $(X_CFLAGS)
ALL_CFLAGS = $(CFLAGS) $(ADDCFLAGS) $(CPPFLAGS) $(LOCAL_CFLAGS)

ALL_LIBS = $(KPSE_LIBS) $(T1LIB_LIBS) $(FREETYPE_LIBS) \
	$(X_LIBS) $(ADDLIBS) $(LIBS)

DEPSOURCES = $(SOURCES)
DEPCFLAGS = $(ALL_CFLAGS)
DISTFILES = $(SOURCES) $(HEADERS) $(OTHERFILES)

CLEANABLE += $(OBJS) $(PROGRAMS) core
DISTCLEANABLE += Makefile

MDVILIB  = ../lib/mdvi.a
PROGRAM = mdvi

.PHONY: all
all: $(PROGRAM)

mdvi: $(MDVILIB) $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(MDVILIB) $(ALL_LIBS)

.PHONY: install
install:
	$(MKINSTALLDIRS) $(bindir)
	$(INSTALL) -m 755 $(PROGRAM) $(bindir)/$(PROGRAM)

.PHONY: uninstall
uninstall:
	$(RM) $(bindir)/$(PROGRAM)

.PHONY: $(MDVILIB)
$(MDVILIB):
	$(MAKE) -C ../lib

../config.mk:
	@echo "*** Error: Run \`configure' in the top source directory."
	@exit 1

.c.o:
	$(CC) $(ALL_CFLAGS) -c $<

dvi.o: dvi.c
	$(CC) $(ALL_CFLAGS) $(T1LIB_CFLAGS) $(FREETYPE_CFLAGS) -DLOCALEDIR=\"$(localedir)\" -c $<

include $(FRAGDIR)/dist.mk
include $(FRAGDIR)/targets.mk
include $(FRAGDIR)/depend.mk