Fri, 05 Dec 2008 23:14:02 +0100
Port to the Qt4 API and bump version pending release engineering.
michael@1 | 1 | ## |
michael@1 | 2 | ## OSSP asgui - Accounting system graphical user interface |
michael@3 | 3 | ## Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) |
michael@3 | 4 | ## Copyright (c) 2002-2008 Ralf S. Engelschall <rse@engelschall.com> |
michael@3 | 5 | ## Copyright (c) 2002-2008 Michael Schloh von Bennewitz <michael@schloh.com> |
michael@3 | 6 | ## Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH |
michael@1 | 7 | ## |
michael@1 | 8 | ## This file is part of OSSP asgui, an accounting system graphical user |
michael@3 | 9 | ## interface which can be found at http://asgui.europalab.com/. |
michael@1 | 10 | ## |
michael@1 | 11 | ## Permission to use, copy, modify, and distribute this software for |
michael@1 | 12 | ## any purpose with or without fee is hereby granted, provided that |
michael@1 | 13 | ## the above copyright notice and this permission notice appear in all |
michael@1 | 14 | ## copies. |
michael@1 | 15 | ## |
michael@1 | 16 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@1 | 17 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@1 | 18 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@1 | 19 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@1 | 20 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@1 | 21 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@1 | 22 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@1 | 23 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@1 | 24 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@1 | 25 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@1 | 26 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@1 | 27 | ## SUCH DAMAGE. |
michael@1 | 28 | ## |
michael@1 | 29 | ## Makefile.in: Autoconf Makefile template |
michael@1 | 30 | ## |
michael@1 | 31 | |
michael@1 | 32 | @SET_MAKE@ |
michael@1 | 33 | |
michael@1 | 34 | DESTDIR = |
michael@1 | 35 | prefix = @prefix@ |
michael@1 | 36 | exec_prefix = @exec_prefix@ |
michael@1 | 37 | bindir = @bindir@ |
michael@1 | 38 | sbindir = @sbindir@ |
michael@1 | 39 | libdir = @libdir@ |
michael@1 | 40 | datadir = @datadir@ |
michael@1 | 41 | includedir = @includedir@ |
michael@1 | 42 | mandir = @mandir@ |
michael@1 | 43 | |
michael@1 | 44 | CC = @CC@ |
michael@1 | 45 | CXX = @CXX@ |
michael@1 | 46 | CFLAGS = @CFLAGS@ @DEFS@ |
michael@1 | 47 | CXXFLAGS = @CXXFLAGS@ @DEFS@ |
michael@1 | 48 | #CFLAGS = @CFLAGS@ @DEFS@ -Wl,-Bstatic |
michael@1 | 49 | #CXXFLAGS = @CXXFLAGS@ @DEFS@ -Wl,-Bstatic |
michael@1 | 50 | CPPFLAGS = @CPPFLAGS@ |
michael@1 | 51 | CXXCPP = @CXXCPP@ |
michael@1 | 52 | LDFLAGS = @LDFLAGS@ |
michael@1 | 53 | LIBS = @LIBS@ |
michael@1 | 54 | |
michael@1 | 55 | # CORBA-specific variables |
michael@1 | 56 | CORBABASE = @CORBABASE@ |
michael@1 | 57 | IDL = $(CORBABASE)/bin/idl |
michael@1 | 58 | |
michael@1 | 59 | # Qt-specific variables |
michael@1 | 60 | QTCFLAGS = @QT_CFLAGS@ |
michael@1 | 61 | QTLIBS = @QT_LIBS@ |
michael@1 | 62 | QTBASE = @QTBASE@ |
michael@1 | 63 | UIC = @UIC@ |
michael@1 | 64 | MOC = @MOC@ |
michael@1 | 65 | |
michael@1 | 66 | RM = rm -f |
michael@1 | 67 | STRIP = strip |
michael@1 | 68 | CHMOD = chmod |
michael@1 | 69 | RMDIR = rmdir |
michael@1 | 70 | SHTOOL = ./shtool |
michael@1 | 71 | POD2MAN = pod2man |
michael@1 | 72 | TRUE = true |
michael@1 | 73 | |
michael@1 | 74 | PROG_NAME = as-gui |
michael@1 | 75 | TARGET_PROGS = as-gui |
michael@1 | 76 | TARGET_MANS = as-gui.1 as-gui.conf.5 |
michael@1 | 77 | |
michael@1 | 78 | SRCS = as_main.cpp as_gui.cpp as_assist.cpp as_slot.cpp as_dataop.cpp as_except.cpp as_generic.cpp as_amount.cpp as_table.cpp as_panel.cpp as_reportpanel.cpp as_helpanel.cpp as_numdial.cpp as_sfile.cpp as_pref.cpp as_user.cpp as_rand.cpp as_crc.cpp as_uuid.cpp as_version.cpp |
michael@1 | 79 | |
michael@1 | 80 | OBJS = as_main.o as_gui.o as_assist.o as_slot.o as_dataop.o as_except.o as_generic.o as_amount.o as_table.o as_panel.o as_sfile.o as_pref.o as_reportpanel.o as_helpanel.o as_numdial.o as_user.o as_rand.o as_crc.o as_uuid.o as_version.o |
michael@1 | 81 | |
michael@1 | 82 | GRAFX = gfx/ossplogo.xpm |
michael@1 | 83 | |
michael@1 | 84 | # IDL compiler generated |
michael@1 | 85 | IDL_SRC = as_stub.idl |
michael@1 | 86 | IDL_OUT = as_stub.cpp as_stub.h |
michael@1 | 87 | IDL_OBJ = as_stub.o |
michael@1 | 88 | |
michael@1 | 89 | # Qt meta object compiler (MOC) generated |
michael@1 | 90 | MOC_OUT = moc_as_gui.cpp moc_as_table.cpp moc_as_panel.cpp moc_as_reportpanel.cpp moc_as_helpanel.cpp moc_as_numdial.cpp |
michael@1 | 91 | MOC_OBJ = moc_as_gui.o moc_as_table.o moc_as_panel.o moc_as_reportpanel.o moc_as_helpanel.o moc_as_numdial.o |
michael@1 | 92 | |
michael@1 | 93 | .SUFFIXES: |
michael@1 | 94 | .SUFFIXES: .c .cc .cpp .cxx .o |
michael@1 | 95 | .c.o: |
michael@1 | 96 | $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< |
michael@1 | 97 | |
michael@1 | 98 | .cc.o: |
michael@1 | 99 | $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< |
michael@1 | 100 | |
michael@1 | 101 | .cpp.o: |
michael@1 | 102 | $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< |
michael@1 | 103 | |
michael@1 | 104 | .cxx.o: |
michael@1 | 105 | $(CXX) -c $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< |
michael@1 | 106 | |
michael@1 | 107 | all: Makefile $(TARGET_PROGS) |
michael@1 | 108 | |
michael@1 | 109 | # Build the program conditionally including |
michael@1 | 110 | # RPC stubs and skeleton objects |
michael@1 | 111 | ifdef CORBABASE |
michael@1 | 112 | $(PROG_NAME): $(OBJS) $(IDL_OBJ) $(MOC_OBJ) |
michael@1 | 113 | $(CXX) $(LDFLAGS) -o $@ $+ $(QTLIBS) $(LIBS) |
michael@1 | 114 | else |
michael@1 | 115 | $(PROG_NAME): $(OBJS) $(MOC_OBJ) |
michael@1 | 116 | $(CXX) $(LDFLAGS) -o $@ $+ $(QTLIBS) $(LIBS) |
michael@1 | 117 | endif |
michael@1 | 118 | |
michael@1 | 119 | moc_%.cpp: %.h |
michael@1 | 120 | $(MOC) $< -o $@ |
michael@1 | 121 | |
michael@1 | 122 | # Use the Trolltech uic to compile headers |
michael@1 | 123 | # and implementation from ui XML |
michael@1 | 124 | #%.h: %.ui |
michael@1 | 125 | # uic $< -o $@ |
michael@1 | 126 | #%.cpp: %.ui |
michael@1 | 127 | # uic -impl $*.h $< -o $@ |
michael@1 | 128 | |
michael@1 | 129 | # Run the IDL compiler over IDL source |
michael@1 | 130 | # but avoid a make deps spaghetti nest |
michael@1 | 131 | ifdef CORBABASE |
michael@1 | 132 | $(SRCS):$(IDL_OUT) |
michael@1 | 133 | $(IDL_OUT): $(IDL_SRC) |
michael@1 | 134 | $(IDL) --c++-suffix=cpp $< |
michael@1 | 135 | endif |
michael@1 | 136 | |
michael@1 | 137 | # Special treatment for help panel class, which needs the $datadir variable |
michael@1 | 138 | as_helpanel.o: as_helpanel.cpp |
michael@1 | 139 | $(CXX) -c -DTITRAQ_DOCDIR=\"$(datadir)\" $(CPPFLAGS) $(QTCFLAGS) $(CXXFLAGS) $< |
michael@1 | 140 | |
michael@1 | 141 | doc: as-gui.1 as-gui.conf.5 as-events.5 as-accounts.5 |
michael@1 | 142 | |
michael@1 | 143 | as-gui.1: as-gui.pod |
michael@1 | 144 | VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ |
michael@1 | 145 | VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ |
michael@1 | 146 | D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ |
michael@1 | 147 | $(POD2MAN) --quotes=none \ |
michael@1 | 148 | --section=1 --center="AS Accounting System" \ |
michael@1 | 149 | --release="$$D" --date="as-gui $$VS" as-gui.pod | \ |
michael@1 | 150 | sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-gui.1 |
michael@1 | 151 | |
michael@1 | 152 | as-gui.conf.5: as-gui.conf.pod |
michael@1 | 153 | VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ |
michael@1 | 154 | VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ |
michael@1 | 155 | D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ |
michael@1 | 156 | $(POD2MAN) --quotes=none \ |
michael@1 | 157 | --section=5 --center="AS Preferences File" \ |
michael@1 | 158 | --release="$$D" --date="as-gui $$VS" as-gui.conf.pod | \ |
michael@1 | 159 | sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-gui.conf.5 |
michael@1 | 160 | |
michael@1 | 161 | as-events.5: as-events.pod |
michael@1 | 162 | VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ |
michael@1 | 163 | VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ |
michael@1 | 164 | D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ |
michael@1 | 165 | $(POD2MAN) --quotes=none \ |
michael@1 | 166 | --section=5 --center="AS Events File" \ |
michael@1 | 167 | --release="$$D" --date="as-gui $$VS" as-events.pod | \ |
michael@1 | 168 | sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-events.5 |
michael@1 | 169 | |
michael@1 | 170 | as-accounts.5: as-accounts.pod |
michael@1 | 171 | VS=`$(SHTOOL) version -lc -dshort as_version.cpp`; \ |
michael@1 | 172 | VL=`$(SHTOOL) version -lc -dlong as_version.cpp`; \ |
michael@1 | 173 | D=`$(SHTOOL) version -lc -dlong as_version.cpp | sed -e 's;.*(;;' -e 's;).*;;'`; \ |
michael@1 | 174 | $(POD2MAN) --quotes=none \ |
michael@1 | 175 | --section=5 --center="AS Accounts File" \ |
michael@1 | 176 | --release="$$D" --date="as-gui $$VS" as-accounts.pod | \ |
michael@1 | 177 | sed -e "s;ASGUI_VERSION_STR;$$VL;" >as-accounts.5 |
michael@1 | 178 | |
michael@1 | 179 | install: all |
michael@1 | 180 | $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) |
michael@1 | 181 | $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) |
michael@1 | 182 | $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 |
michael@1 | 183 | $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man5 |
michael@1 | 184 | $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir) |
michael@1 | 185 | $(SHTOOL) install -c -s -m 755 as-gui $(DESTDIR)$(bindir)/as-gui |
michael@1 | 186 | $(SHTOOL) install -c -m 644 as-gui.1 $(DESTDIR)$(mandir)/man1/as-gui.1 |
michael@1 | 187 | $(SHTOOL) install -c -m 644 as-gui.conf.5 $(DESTDIR)$(mandir)/man5/as-gui.conf.5 |
michael@1 | 188 | $(SHTOOL) install -c -m 644 as-events.5 $(DESTDIR)$(mandir)/man5/as-events.5 |
michael@1 | 189 | $(SHTOOL) install -c -m 644 as-accounts.5 $(DESTDIR)$(mandir)/man5/as-accounts.5 |
michael@1 | 190 | $(SHTOOL) install -c -m 644 as-gui.html $(DESTDIR)$(datadir)/as-gui.html |
michael@1 | 191 | |
michael@1 | 192 | uninstall: |
michael@1 | 193 | $(RM) $(DESTDIR)$(datadir)/as-gui.html |
michael@1 | 194 | $(RM) $(DESTDIR)$(mandir)/man5/as-accounts.5 |
michael@1 | 195 | $(RM) $(DESTDIR)$(mandir)/man5/as-events.5 |
michael@1 | 196 | $(RM) $(DESTDIR)$(mandir)/man5/as-gui.conf.5 |
michael@1 | 197 | $(RM) $(DESTDIR)$(mandir)/man1/as-gui.1 |
michael@1 | 198 | $(RM) $(DESTDIR)$(bindir)/as-gui |
michael@1 | 199 | $(RMDIR) $(DESTDIR)$(datadir) >/dev/null 2>&1 || $(TRUE) |
michael@1 | 200 | $(RMDIR) $(DESTDIR)$(mandir)/man5 >/dev/null 2>&1 || $(TRUE) |
michael@1 | 201 | $(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE) |
michael@1 | 202 | $(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE) |
michael@1 | 203 | $(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) |
michael@1 | 204 | $(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) |
michael@1 | 205 | |
michael@1 | 206 | clean: |
michael@1 | 207 | $(RM) $(TARGET_PROGS) $(OBJS) $(IDL_OBJ) $(MOC_OBJ) |
michael@1 | 208 | ifdef CORBABASE |
michael@1 | 209 | $(RM) $(IDL_OBJ) |
michael@1 | 210 | endif |
michael@1 | 211 | $(RM) as_gui_pcre.tab *.core |
michael@1 | 212 | |
michael@1 | 213 | distclean: clean |
michael@1 | 214 | $(RM) config.log config.status config.cache # Generated by ./configure |
michael@1 | 215 | $(RM) Makefile ac_config.h # Generated by ./configure |
michael@1 | 216 | ifdef CORBABASE |
michael@1 | 217 | $(RM) $(IDL_OUT) # Generated by $(IDL) |
michael@1 | 218 | endif |
michael@1 | 219 | $(RM) $(MOC_OUT) # Generated by $(MOC) |
michael@1 | 220 | |
michael@1 | 221 | realclean: distclean |
michael@1 | 222 | $(RM) configure ac_config.h.in* # Generated by Autoconf |
michael@1 | 223 | $(RM) configure.lineno # Generated by Autoconf |
michael@1 | 224 | $(RM) shtool # Generated by Devtool |
michael@1 | 225 | |
michael@1 | 226 | check: test |
michael@1 | 227 | test: as-gui |
michael@1 | 228 | ./as_gui_test.sh |
michael@1 | 229 | |
michael@1 | 230 | .PHONY: doc install uninstall clean distclean realclean check test |