759790e4991a5b1ec3cecaf17bb2b9d9c169e230
[mono.git] / mcs / tools / security / Makefile
1 thisdir = tools/security
2 SUBDIRS = 
3 DIST_ONLY_SUBDIRS = certview
4 include ../../build/rules.make
5
6 LOCAL_MCS_FLAGS = /lib:$(topdir)/class/lib/$(PROFILE) -r:Mono.Security.dll
7
8 ifeq (default, $(PROFILE))
9 SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe makecert.exe chktrust.exe \
10         signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe
11 else
12 SECURITY_PROGRAMS = httpcfg.exe
13 endif
14
15 SECURITY_SOURCES = AssemblyInfo.cs $(topdir)/build/common/Consts.cs StrongNameManager.cs $(SECURITY_PROGRAMS:.exe=.cs)
16
17 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
18
19 DISTFILES = README TESTS $(SECURITY_SOURCES)
20
21 ifeq (net_1_1_bootstrap, $(PROFILE))
22 all-local: $(topdir)/class/lib/$(PROFILE)/sn.exe
23 else
24 all-local: $(SECURITY_PROGRAMS)
25 endif
26
27 install-local: all-local
28 uninstall-local:
29
30 ifndef NO_INSTALL
31 install-local: $(SECURITY_PROGRAMS)
32         $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
33         for p in $(SECURITY_PROGRAMS) ; do \
34             $(INSTALL_BIN) $$p $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
35             test ! -f $$p.mdb || $(INSTALL_BIN) $$p.mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
36         done
37
38 uninstall-local:
39         for p in $(SECURITY_PROGRAMS) ; do \
40             rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$$p* ; \
41         done
42 endif
43
44 test-local:
45
46 run-test-local run-test-ondotnet-local:
47
48 clean-local:
49         rm -f *.exe *.mdb *.pdb
50         rm -f $(topdir)/class/lib/$(PROFILE)/sn.exe*
51
52 dist-local: dist-default
53
54 sn_sources = sn.cs StrongNameManager.cs AssemblyInfo.cs $(topdir)/build/common/Consts.cs
55 sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(sn_sources)
56         $(CSCOMPILE) /out:$@ $(sn_sources)
57
58 %.exe: %.cs AssemblyInfo.cs $(topdir)/build/common/Consts.cs
59         $(CSCOMPILE) $^