| 1 | ACLOCAL_AMFLAGS = -I unix/m4 -I unix/m4-local |
|---|
| 2 | SUBDIRS = intl po unix/tests |
|---|
| 3 | EXTRA_DIST = unix windows |
|---|
| 4 | bin_PROGRAMS = i3 |
|---|
| 5 | CLEANFILES = *.gcno po/stamp-po |
|---|
| 6 | DISTCLEANFILES = |
|---|
| 7 | BUILT_SOURCES = |
|---|
| 8 | DISTCHECK_CONFIGURE_FLAGS = --disable-debug |
|---|
| 9 | |
|---|
| 10 | WARNING_OPTIONS = \ |
|---|
| 11 | -Wall \ |
|---|
| 12 | -Wextra \ |
|---|
| 13 | -Wno-unused |
|---|
| 14 | |
|---|
| 15 | if ENABLE_DEBUG |
|---|
| 16 | bin_PROGRAMS += i3_test mil_test mil_profile |
|---|
| 17 | |
|---|
| 18 | WARNING_OPTIONS += \ |
|---|
| 19 | -Wcast-align \ |
|---|
| 20 | -Wcast-qual \ |
|---|
| 21 | -Winit-self \ |
|---|
| 22 | -Winvalid-pch \ |
|---|
| 23 | -Wpointer-arith \ |
|---|
| 24 | -Wwrite-strings \ |
|---|
| 25 | -Wfloat-equal \ |
|---|
| 26 | -Wformat=2 \ |
|---|
| 27 | -Wimplicit \ |
|---|
| 28 | -Wmissing-braces \ |
|---|
| 29 | -Wdisabled-optimization \ |
|---|
| 30 | -Wconversion |
|---|
| 31 | |
|---|
| 32 | #-Wno-unused-value |
|---|
| 33 | #-Wno-unused-parameter |
|---|
| 34 | #-Wno-missing-field-initializers |
|---|
| 35 | |
|---|
| 36 | # |
|---|
| 37 | # -Weffc++ \ |
|---|
| 38 | # -Wpadded \ |
|---|
| 39 | # -Wunsafe-loop-optimizations \ |
|---|
| 40 | # -Wdisabled-optimization \ |
|---|
| 41 | # |
|---|
| 42 | |
|---|
| 43 | endif |
|---|
| 44 | |
|---|
| 45 | # gcc precompiled header files |
|---|
| 46 | gch_files = |
|---|
| 47 | if ENABLE_DEBUG |
|---|
| 48 | if USE_GCC_PRECOMPILED_HEADER |
|---|
| 49 | BUILT_SOURCES += ${gch_files} |
|---|
| 50 | gch: ${gch_files} |
|---|
| 51 | else |
|---|
| 52 | gch: |
|---|
| 53 | endif |
|---|
| 54 | else |
|---|
| 55 | gch: |
|---|
| 56 | endif |
|---|
| 57 | |
|---|
| 58 | include unix/am/i3.am |
|---|
| 59 | include unix/am/i3_test.am |
|---|
| 60 | include unix/am/mil_test.am |
|---|
| 61 | include unix/am/mil_profile.am |
|---|
| 62 | |
|---|
| 63 | dist-hook: |
|---|
| 64 | # chmod -R u+rw ${distdir}/unix |
|---|
| 65 | chmod -R u+w ${distdir}/unix |
|---|
| 66 | cp -pR ${srcdir}/unix/am ${distdir}/unix |
|---|
| 67 | # chmod -R u+rw ${distdir}/src |
|---|
| 68 | chmod -R u+w ${distdir}/src |
|---|
| 69 | cp -pR ${srcdir}/src ${distdir} |
|---|
| 70 | chmod -R u+rx ${distdir}/unix/scripts |
|---|
| 71 | cd ${distdir} && ${SHELL} ./unix/scripts/clean_distdir.sh |
|---|
| 72 | |
|---|
| 73 | dist2_distdir = dist2.${CONFIGURE_DATE} |
|---|
| 74 | dist2-hook: |
|---|
| 75 | test "${PACKAGE_VERSION}" = "`${SHELL} ${srcdir}/unix/scripts/ac_init_version.sh`" |
|---|
| 76 | svn status > /dev/null |
|---|
| 77 | test "`svn status | grep -v '^\?'`" = "" |
|---|
| 78 | rm -rf ${dist2_distdir} |
|---|
| 79 | svn co `LC_ALL=en svn info | grep URL | cut -f 2 -d " "` ${dist2_distdir} |
|---|
| 80 | cd ${dist2_distdir} && autoreconf -i && ./configure |
|---|
| 81 | |
|---|
| 82 | dist2: dist2-hook |
|---|
| 83 | cd ${dist2_distdir} && ${MAKE} dist |
|---|
| 84 | |
|---|
| 85 | distcheck2: dist2-hook |
|---|
| 86 | cd ${dist2_distdir} && ${MAKE} distcheck |
|---|
| 87 | |
|---|
| 88 | check2: |
|---|
| 89 | flawfinder ${srcdir}/src |
|---|
| 90 | find ${srcdir}/src -name "*.cpp" -type f | xargs rats |
|---|
| 91 | |
|---|
| 92 | # copy locale file for windows |
|---|
| 93 | windows-locale: |
|---|
| 94 | ${PERL} unix/scripts/windows-locale.pl ${PACKAGE_NAME} |
|---|
| 95 | |
|---|
| 96 | if WITH_OS_WINDOWS |
|---|
| 97 | |
|---|
| 98 | DISTCHECK_CONFIGURE_FLAGS += --enable-threads=win32 |
|---|
| 99 | |
|---|
| 100 | if WITH_GUI_WINDOWS |
|---|
| 101 | |
|---|
| 102 | windows/bin/i3.exe: i3.exe |
|---|
| 103 | ${MKDIR_P} windows/bin |
|---|
| 104 | cp i3.exe windows/bin/i3.win9x.exe |
|---|
| 105 | |
|---|
| 106 | # dist |
|---|
| 107 | windows-dist: \ |
|---|
| 108 | windows/bin/i3.Release.Win32.exe \ |
|---|
| 109 | windows/bin/i3.Release.x64.exe \ |
|---|
| 110 | windows/bin/i3.win9x.exe |
|---|
| 111 | ${PERL} unix/scripts/windows-dist.pl ${PACKAGE_NAME} ${PACKAGE_VERSION} |
|---|
| 112 | |
|---|
| 113 | endif |
|---|
| 114 | endif |
|---|
| 115 | |
|---|
| 116 | if ENABLE_DEBUG |
|---|
| 117 | if WITH_GUI_COCOA |
|---|
| 118 | bin_PROGRAMS += coco |
|---|
| 119 | coco_SOURCES = tmp/onmainthread.cpp |
|---|
| 120 | coco_CXXFLAGS = ${i3_CXXFLAGS} |
|---|
| 121 | coco_LDFLAGS = ${i3_LDFLAGS} |
|---|
| 122 | coco_LDADD = ${i3_LDADD} |
|---|
| 123 | endif |
|---|
| 124 | endif |
|---|
| 125 | |
|---|
| 126 | deb: |
|---|
| 127 | # ${MAKE} dist2-hook |
|---|
| 128 | # cd ${dist2_distdir} && ${MAKE} dist-gzip |
|---|
| 129 | # cp ${dist2_distdir}/${PACKAGE}-${VERSION}.tar.gz . |
|---|
| 130 | ${MAKE} dist-gzip |
|---|
| 131 | rm -fr debpackage |
|---|
| 132 | mkdir debpackage |
|---|
| 133 | tar xf ${PACKAGE}-${VERSION}.tar.gz \ |
|---|
| 134 | --directory debpackage |
|---|
| 135 | cd debpackage/${PACKAGE}-${VERSION}/ && \ |
|---|
| 136 | cp -pR unix/debian . && \ |
|---|
| 137 | dpkg-buildpackage -S && \ |
|---|
| 138 | lintian ../*.dsc |
|---|
| 139 | |
|---|