| 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 System.Core |
| 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 | test ! -f $${p%.exe}.pdb || $(INSTALL_BIN) $${p%.exe}.pdb $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \ |
| 44 | done |
| 45 | |
| 46 | uninstall-local: |
| 47 | for p in $(SECURITY_TARGETS) ; do \ |
| 48 | rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$$p* ; \ |
| 49 | done |
| 50 | endif |
| 51 | |
| 52 | test-local: |
| 53 | |
| 54 | run-test-local run-test-ondotnet-local: |
| 55 | |
| 56 | clean-local: |
| 57 | rm -f *.exe *.mdb *.pdb |
| 58 | rm -f $(topdir)/class/lib/$(PROFILE)/sn.exe* |
| 59 | |
| 60 | dist-local: dist-default |
| 61 | |
| 62 | sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(SN_SOURCES) |
| 63 | $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/Mono.Security.dll /out:$@ $(SN_SOURCES) |
| 64 | |
| 65 | permview.exe: permview.cs |
| 66 | $(CSCOMPILE) $^ $(HELPER_SOURCES) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll |
| 67 | |
| 68 | %.exe: %.cs $(HELPER_SOURCES) |
| 69 | $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/Mono.Security.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll $^ |