Merge pull request #2803 from BrzVlad/feature-conc-pinned-scan
[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 = 
7 LIB_REFS = Mono.Security System
8
9 SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe makecert.exe chktrust.exe crlupdate.exe \
10         signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe cert-sync.exe
11 SECURITY_PROGRAMS_2_0 = httpcfg.exe
12
13 HELPER_SOURCES = AssemblyInfo.cs $(topdir)/build/common/Consts.cs
14 SN_SOURCES = sn.cs StrongNameManager.cs $(HELPER_SOURCES)
15
16 SECURITY_SOURCES = $(HELPER_SOURCES) $(SN_SOURCES) $(SECURITY_PROGRAMS:.exe=.cs) $(SECURITY_PROGRAMS_2_0:.exe=.cs)
17
18 ifeq ($(DEFAULT_PROFILE), $(PROFILE))
19 SECURITY_TARGETS = $(SECURITY_PROGRAMS) $(SECURITY_PROGRAMS_2_0)
20 endif
21
22 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
23
24 DISTFILES = README TESTS $(SECURITY_SOURCES)
25
26 ifeq (build, $(PROFILE))
27 all-local: $(topdir)/class/lib/$(PROFILE)/sn.exe
28 else
29 all-local: $(SECURITY_TARGETS)
30 endif
31
32 doc-update-local:
33
34 install-local: all-local
35 uninstall-local:
36
37 ifndef NO_INSTALL
38 install-local: $(SECURITY_TARGETS)
39         $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
40         for p in $(SECURITY_TARGETS) ; do \
41             $(INSTALL_BIN) $$p $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
42             test ! -f $$p.mdb || $(INSTALL_BIN) $$p.mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
43         done
44
45 uninstall-local:
46         for p in $(SECURITY_TARGETS) ; do \
47             rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$$p* ; \
48         done
49 endif
50
51 test-local:
52
53 run-test-local run-test-ondotnet-local csproj-local:
54
55 clean-local:
56         rm -f *.exe *.mdb *.pdb
57         rm -f $(topdir)/class/lib/$(PROFILE)/sn.exe*
58
59 dist-local: dist-default
60
61 sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(SN_SOURCES)
62         $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Security.dll /out:$@ $(SN_SOURCES)
63
64 permview.exe: permview.cs
65         $(CSCOMPILE) $^ $(HELPER_SOURCES) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll
66
67 %.exe: %.cs $(HELPER_SOURCES)
68         $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Security.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll $^