Makefile.in 1.91 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@SET_MAKE@

srcdir = @srcdir@
VPATH = @srcdir@

top_srcdir = @top_srcdir@

INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = $(INSTALL_PROGRAM) -s
MKDIR_P = @MKDIR_P@

include ../config.make

PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L..

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

all: $(TARGETS)

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

SOURCES = $(sexp_conv_SOURCES) nettle-lfib-stream.c pkcs1-conv.c

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

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

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

pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT))
pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle.a
43
	$(LINK) $(pkcs1_conv_OBJS) -lhogweed -lnettle $(LIBS) -o $@
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

.c.$(OBJEXT):
	$(COMPILE) -c $< && $(DEP_PROCESS)


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

check:
	true

install: $(TARGETS)
	$(MKDIR_P) $(DESTDIR)$(bindir)
	for f in $(TARGETS) ; do \
	  $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir) ; \
	done

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

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

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

distclean: clean
	-rm -f Makefile *.d

tags:
	etags --include $(top_srcdir) $(srcdir)/*.c $(srcdir)/*.h

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