| 1 | ACLOCAL_AMFLAGS = -I unix/m4 -I unix/m4-local |
|---|
| 2 | SUBDIRS = intl po unix/tests |
|---|
| 3 | EXTRA_DIST = windows |
|---|
| 4 | bin_SCRIPTS = $(PACKAGE)$(EXEEXT) |
|---|
| 5 | EXTRA_PROGRAMS = i3 i3_test mil_test mil_profile |
|---|
| 6 | CLEANFILES = po/stamp-po *.gcno |
|---|
| 7 | DISTCLEANFILES = $(PACKAGE)$(EXEEXT) i3$(EXEEXT) |
|---|
| 8 | BUILT_SOURCES = |
|---|
| 9 | DISTCHECK_CONFIGURE_FLAGS = --disable-debug |
|---|
| 10 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = |
|---|
| 11 | |
|---|
| 12 | $(PACKAGE)$(EXEEXT): i3$(EXEEXT) |
|---|
| 13 | cp -f $< $@ |
|---|
| 14 | |
|---|
| 15 | DEFS += -DLOCALEDIR=\"$(localedir)\" # can't be written on configure.ac, |
|---|
| 16 | # It conflicts with intl/Makefile |
|---|
| 17 | |
|---|
| 18 | LIBS += $(LIBINTL) # can't be written on configure.ac |
|---|
| 19 | # $(LIBINTL) can be intl/libintl.a |
|---|
| 20 | |
|---|
| 21 | if WITH_OS_WINDOWS |
|---|
| 22 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += $(PACKAGE)$(EXEEXT) |
|---|
| 23 | endif |
|---|
| 24 | |
|---|
| 25 | include unix/am/i3.am |
|---|
| 26 | include unix/am/i3_test.am |
|---|
| 27 | include unix/am/mil_test.am |
|---|
| 28 | include unix/am/mil_profile.am |
|---|
| 29 | include unix/am/libobjcexceptionfilter.am |
|---|
| 30 | |
|---|
| 31 | # gcc precompiled header files |
|---|
| 32 | if USE_GCC_PRECOMPILED_HEADER |
|---|
| 33 | gch_source = $(srcdir)/src/mil/include/mil/PrecompiledHeaders.h |
|---|
| 34 | gch_file = $(gch_source).gch |
|---|
| 35 | BUILT_SOURCES += #$(gch_file) |
|---|
| 36 | CLEANFILES += $(gch_file) |
|---|
| 37 | gch: $(gch_file) |
|---|
| 38 | $(gch_file): src/mil/include/mil/PrecompiledHeaders.h \ |
|---|
| 39 | src/mil/include/mil/os-windows/PrecompiledHeaders.h \ |
|---|
| 40 | src/mil/include/mil/os-unix/PrecompiledHeaders.h \ |
|---|
| 41 | src/mil/include/mil/gui-windows/PrecompiledHeaders.h \ |
|---|
| 42 | src/mil/include/mil/gui-cocoa/PrecompiledHeaders.h |
|---|
| 43 | $(CXXCOMPILE) -x $(GCH_LANG) -c $(gch_source) -o $@ |
|---|
| 44 | else |
|---|
| 45 | gch: |
|---|
| 46 | endif |
|---|
| 47 | |
|---|
| 48 | dist-hook: |
|---|
| 49 | chmod -R u+rw $(distdir)/unix $(distdir)/src |
|---|
| 50 | cp -pR $(srcdir)/unix $(srcdir)/src $(distdir) |
|---|
| 51 | chmod -R u+rx $(distdir)/unix/scripts |
|---|
| 52 | test -r $(distdir)/unix/scripts/ac_init_version.sh |
|---|
| 53 | cd $(distdir) && $(SHELL) ./unix/scripts/clean_distdir.sh |
|---|
| 54 | |
|---|
| 55 | dist2_distdir = dist2.$(CONFIGURE_DATE) |
|---|
| 56 | dist2-hook: |
|---|
| 57 | bash -n $(srcdir)/configure |
|---|
| 58 | test -r $(srcdir)/unix/scripts/ac_init_version.sh |
|---|
| 59 | test -x $(srcdir)/unix/scripts/ac_init_version.sh |
|---|
| 60 | test "$(PACKAGE_VERSION)" = "`$(SHELL) $(srcdir)/unix/scripts/ac_init_version.sh`" |
|---|
| 61 | svn status > /dev/null |
|---|
| 62 | test "`svn status | grep -v '^\?'`" = "" |
|---|
| 63 | rm -rf $(dist2_distdir) |
|---|
| 64 | svn co `LC_ALL=en svn info | grep URL | cut -f 2 -d " "` $(dist2_distdir) |
|---|
| 65 | cd $(dist2_distdir) && autoreconf -i && ./configure |
|---|
| 66 | |
|---|
| 67 | dist2: dist2-hook |
|---|
| 68 | cd $(dist2_distdir) && $(MAKE) dist |
|---|
| 69 | |
|---|
| 70 | distcheck2: dist2-hook |
|---|
| 71 | cd $(dist2_distdir) && $(MAKE) distcheck |
|---|
| 72 | |
|---|
| 73 | check2: |
|---|
| 74 | flawfinder $(srcdir)/src |
|---|
| 75 | find $(srcdir)/src -name "*.cc" -type f | xargs rats |
|---|
| 76 | find $(srcdir)/src -name "*.h" -type f | xargs rats |
|---|
| 77 | |
|---|
| 78 | # copy locale file for windows |
|---|
| 79 | windows-locale: |
|---|
| 80 | $(PERL) unix/scripts/windows-locale.pl $(PACKAGE_NAME) |
|---|
| 81 | |
|---|
| 82 | if WITH_OS_WINDOWS |
|---|
| 83 | |
|---|
| 84 | DISTCHECK_CONFIGURE_FLAGS += --enable-threads=win32 |
|---|
| 85 | |
|---|
| 86 | if WITH_GUI_WINDOWS |
|---|
| 87 | |
|---|
| 88 | windows/bin/$(PACKAGE).win9x.exe: $(PACKAGE).exe |
|---|
| 89 | $(MKDIR_P) windows/bin |
|---|
| 90 | cp -f $< $@ |
|---|
| 91 | |
|---|
| 92 | # dist |
|---|
| 93 | windows-dist: \ |
|---|
| 94 | windows/bin/$(PACKAGE).Release.Win32.exe \ |
|---|
| 95 | windows/bin/$(PACKAGE).Release.x64.exe \ |
|---|
| 96 | windows/bin/$(PACKAGE).win9x.exe |
|---|
| 97 | $(PERL) unix/scripts/windows-dist.pl $(PACKAGE) $(VERSION) |
|---|
| 98 | |
|---|
| 99 | endif |
|---|
| 100 | endif |
|---|
| 101 | |
|---|
| 102 | EXTRA_PROGRAMS += nls_test |
|---|
| 103 | nls_test_SOURCES = tmp/nls.cc |
|---|
| 104 | |
|---|
| 105 | deb: dist-gzip #dist2-hook |
|---|
| 106 | rm -fr debpackage |
|---|
| 107 | $(MKDIR_P) debpackage |
|---|
| 108 | cp $(PACKAGE)-$(VERSION).tar.gz debpackage/$(PACKAGE)_$(VERSION).orig.tar.gz |
|---|
| 109 | cd debpackage && \ |
|---|
| 110 | tar zxf $(PACKAGE)_$(VERSION).orig.tar.gz && \ |
|---|
| 111 | cd $(PACKAGE)-$(VERSION) && \ |
|---|
| 112 | cp -pR unix/debian . && \ |
|---|
| 113 | debuild -uc -us |
|---|
| 114 | |
|---|
| 115 | rpm: dist-gzip |
|---|
| 116 | rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | |
|---|