2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tools / security / Makefile
blob3bc39635b44dcde614b5cbf99e0756c5ad17bf87
1 thisdir = tools/security
2 SUBDIRS =
3 DIST_ONLY_SUBDIRS = certview
4 include ../../build/rules.make
6 LOCAL_MCS_FLAGS = /lib:$(topdir)/class/lib/$(PROFILE) -r:Mono.Security.dll
8 SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe makecert.exe chktrust.exe \
9 signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe
10 SECURITY_PROGRAMS_2_0 = httpcfg.exe
12 HELPER_SOURCES = AssemblyInfo.cs $(topdir)/build/common/Consts.cs
13 SN_SOURCES = sn.cs StrongNameManager.cs $(HELPER_SOURCES)
15 SECURITY_SOURCES = $(HELPER_SOURCES) $(SN_SOURCES) $(SECURITY_PROGRAMS:.exe=.cs) $(SECURITY_PROGRAMS_2_0:.exe=.cs)
17 ifeq (net_4_0, $(PROFILE))
18 SECURITY_TARGETS = $(SECURITY_PROGRAMS) $(SECURITY_PROGRAMS_2_0)
19 endif
21 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
23 DISTFILES = README TESTS $(SECURITY_SOURCES)
25 ifeq (basic, $(PROFILE))
26 all-local: $(topdir)/class/lib/$(PROFILE)/sn.exe
27 else
28 all-local: $(SECURITY_TARGETS)
29 endif
31 doc-update-local:
33 install-local: all-local
34 uninstall-local:
36 ifndef NO_INSTALL
37 install-local: $(SECURITY_TARGETS)
38 $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
39 for p in $(SECURITY_TARGETS) ; do \
40 $(INSTALL_BIN) $$p $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
41 test ! -f $$p.mdb || $(INSTALL_BIN) $$p.mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
42 done
44 uninstall-local:
45 for p in $(SECURITY_TARGETS) ; do \
46 rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$$p* ; \
47 done
48 endif
50 test-local:
52 run-test-local run-test-ondotnet-local csproj-local:
54 clean-local:
55 rm -f *.exe *.mdb *.pdb
56 rm -f $(topdir)/class/lib/$(PROFILE)/sn.exe*
58 dist-local: dist-default
60 sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(SN_SOURCES)
61 $(CSCOMPILE) /out:$@ $(SN_SOURCES)
63 permview.exe: permview.cs
64 $(CSCOMPILE) $^ $(HELPER_SOURCES) -r:Mono.Cecil.dll
66 %.exe: %.cs $(HELPER_SOURCES)
67 $(CSCOMPILE) $^