Makefile.in 1.95 KB
Newer Older
1
2
3
4
5
6
7
@SET_MAKE@

srcdir = @srcdir@
VPATH = @srcdir@

top_srcdir = @top_srcdir@

8
9
10
11
12
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = $(INSTALL_PROGRAM) -s
13
MKDIR_P = @MKDIR_P@
14

15
16
include ../config.make

17
18
PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L..
19

20
21
22
HOGWEED_TARGETS = pkcs1-conv$(EXEEXT)
TARGETS = sexp-conv$(EXEEXT) nettle-lfib-stream$(EXEEXT) \
	  @IF_HOGWEED@ $(HOGWEED_TARGETS)
23
24
25
26
27

all: $(TARGETS)

sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c \
	getopt.c getopt1.c misc.c
28
pkcs1_conv_SOURCES = pkcs1-conv.c getopt.c getopt1.c misc.c
29

Niels Möller's avatar
Niels Möller committed
30
SOURCES = $(sexp_conv_SOURCES) nettle-lfib-stream.c pkcs1-conv.c
31

32
DISTFILES = $(SOURCES) Makefile.in getopt.h input.h misc.h output.h parse.h
33

34
sexp_conv_OBJS = $(sexp_conv_SOURCES:.c=.$(OBJEXT))
35
sexp-conv$(EXEEXT): $(sexp_conv_OBJS) ../libnettle.a
36
	$(LINK) $(sexp_conv_OBJS) -lnettle $(LIBS) -o $@
37

38
nettle-lfib-stream$(EXEEXT): nettle-lfib-stream.$(OBJEXT) ../libnettle.a
39
	$(LINK) nettle-lfib-stream.$(OBJEXT) -lnettle $(LIBS) -o $@
40

41
pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT))
42
pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle.a ../libhogweed.a
43
	$(LINK) $(pkcs1_conv_OBJS) -lhogweed -lnettle $(LIBS) -o $@
Niels Möller's avatar
Niels Möller committed
44

45
.c.$(OBJEXT):
46
	$(COMPILE) -c $< && $(DEP_PROCESS)
47
48
49
50
51
52
53
54
55


Makefile: $(srcdir)/Makefile.in ../config.status
	cd .. && $(SHELL) ./config.status tools/$@

check:
	true

install: $(TARGETS)
56
57
58
59
	$(MKDIR_P) $(DESTDIR)$(bindir)
	for f in $(TARGETS) ; do \
	  $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir) ; \
	done
60
61
62
63
64

uninstall:
	for f in $(TARGETS) ; do \
	  rm -f $(DESTDIR)$(bindir)/$$f ; \
	done
65

66
67
# NOTE: I'd like to use $^, but that's a GNU extension. $? should be
# more portable, equivalent for phony targets.
68
distdir: $(DISTFILES)
69
	cp $? $(distdir)
70
71

clean:
72
	-rm -f $(TARGETS) *.o
73
74

distclean: clean
75
	-rm -f Makefile *.d
76

77
tags:
78
	etags -o $(srcdir)/TAGS --include $(top_srcdir) $(srcdir)/*.c $(srcdir)/*.h
79

80
@DEP_INCLUDE@ $(SOURCES:.c=.$(OBJEXT).d)