Refactor file writing - introduce template driven file writing
[openssl.git] / tools / Makefile.in
1 #
2 # OpenSSL/tools/Makefile
3 #
4
5 DIR=    tools
6 TOP=    ..
7 CC=     cc
8 INCLUDES= -I$(TOP) -I../../include
9 CFLAG=-g
10 MAKEFILE=       Makefile
11
12 CFLAGS= $(INCLUDES) $(CFLAG)
13
14 GENERAL=Makefile
15 APPS= c_rehash
16 MISC_APPS= c_hash c_info c_issuer c_name
17
18 all: apps
19
20 apps: $(APPS)
21
22 install:
23         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
24         @for i in $(APPS) ; \
25         do  \
26         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
27         chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
28         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
29         done;
30         @for i in $(MISC_APPS) ; \
31         do  \
32         (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
33         chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
34         mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
35         done;
36
37 uninstall:
38         @for i in $(APPS) ; \
39         do  \
40                 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
41                 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
42         done;
43         @for i in $(MISC_APPS) ; \
44         do  \
45                 echo $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
46                 $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
47         done;
48
49 files:
50         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
51
52 errors:
53
54 depend:
55
56 clean:
57         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
58
59 errors:
60
61 c_rehash: c_rehash.in
62         $(PERL) -I$(TOP) -Mconfigdata $(TOP)/util/dofile.pl < c_rehash.in > c_rehash.new
63         mv c_rehash.new c_rehash
64
65 # DO NOT DELETE THIS LINE -- make depend depends on it.