Makefile.in 1.79 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
13
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = $(INSTALL_PROGRAM) -s

14
15
include ../config.make

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

Niels Möller's avatar
Niels Möller committed
19
TARGETS = sexp-conv$(EXEEXT) nettle-lfib-stream$(EXEEXT) @RSA_TOOLS@
20
21
22
23
24

all: $(TARGETS)

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

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

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

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

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

38
39
40
pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT))
pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle.a
	$(LINK) $(pkcs1_conv_OBJS) -lnettle $(LIBS) -o $@
Niels Möller's avatar
Niels Möller committed
41

42
.c.$(OBJEXT):
43
	$(COMPILE) -c $< && $(DEP_PROCESS)
44
45
46
47
48
49
50
51
52


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

check:
	true

install: $(TARGETS)
53
54
55
56
57
58
59
	$(INSTALL) -d $(DESTDIR)$(bindir)
	$(INSTALL_PROGRAM) $(TARGETS) $(DESTDIR)$(bindir)

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

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

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

distclean: clean
70
	-rm -f Makefile *.d
71

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

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