-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
94 lines (77 loc) · 2.83 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Build @PACKAGE_STRING@
#
# @configure_input@
#
# C++ encapsulation of ATMI and a set of tools to help write Tuxedo applications.
prefix=@prefix@
exec_prefix=@exec_prefix@
LIBDIR=@libdir@
INCLUDEDIR=@includedir@/atmi
INSTALL=@INSTALL@
LOCALEDIR=@localedir@
LIBDIR=@libdir@
RM=@RM@
DOXYGEN=@DOXYGEN@
CODECHECK=@CODECHECK@
MKDIR=@MKDIR_P@
LN_S=@LN_S@
DEPLOY=@DEPLOY@
REPOSITORY=@REPOSITORY@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_DEVELOP=@PACKAGE_NAME@-@BUILD@-@build_os@-dev.tar.gz
PACKAGE_SRC=@PACKAGE_NAME@-@BUILD@.tar.gz
PACKAGE=@PACKAGE_NAME@-@BUILD@-@build_os@.tar.gz
HEADERS=@HEADERS@
LIBATMI=libatmi++.a
LIBCLTATMI=libcltatmi++.a
LIBFML=libfml++.a
LIBS=$(LIBATMI) $(LIBCLTATMI) $(LIBFML)
BINS=decode qexport qimport qwriter tmreboot
all:
(cd src && $(MAKE) all )
(cd utls && $(MAKE) all )
#demos:
# cd samples/atmi++ ; $(MAKE) globber all clean
# cd samples/utl ; $(MAKE) globber all clean
pkg: clean all
$(MKDIR) distrib
tar cf - `git ls-files` | gzip -c > distrib/$(PACKAGE_SRC)
tar cf - include lib | gzip -c > distrib/$(PACKAGE_DEVELOP)
tar cf - bin | gzip -c > distrib/$(PACKAGE)
# this target can only be used if REPOSITORY is set (hence the test)
deploy: pkg
@test ! -z "$(REPOSITORY)" && ( cd distrib && $(DEPLOY) $(PACKAGE_SRC) $(REPOSITORY) 2> /dev/null && echo "deployed $(PACKAGE_SRC)") || echo "WARNING use ./configure --enable-repository to enable deploy target"
@test ! -z "$(REPOSITORY)" && ( cd distrib && $(DEPLOY) $(PACKAGE_DEVELOP) $(REPOSITORY) 2> /dev/null && echo "deployed $(PACKAGE_DEVELOP)") || echo "WARNING use ./configure --enable-repository to enable deploy target"
@test ! -z "$(REPOSITORY)" && ( cd distrib && $(DEPLOY) $(PACKAGE) $(REPOSITORY) 2> /dev/null && echo "deployed $(PACKAGE)") || echo "WARNING use ./configure --enable-repository to enable deploy target"
rpm: pkg
mkdir -p rpmbuild/BUILD rpmbuild/RPMS rpmbuild/SOURCES rpmbuild/SPECS rpmbuild/SRPMS rpmbuild/tmp
cp distrib/$(PACKAGE_SRC) rpmbuild/SOURCES
rpm --define "_topdir ${PWD}/rpmbuild" --define "_rpmdir ${PWD}/distrib" -bb @PACKAGE_NAME@.spec && echo "your RPM is here ./ditrib"
clean:
( cd src && make clean )
( cd utls && make clean )
$(RM) -R distrib rpmbuild
$(RM) bin/*
globber:clean
${RM} -R distrib doc html man autom4te.cache distrib
${RM} confdefs.h config.status
(cd src && $(MAKE) globber)
(cd utls && $(MAKE) globber)
doxygen:
${DOXYGEN}
codecheck:
$(CODECHECK)
version:
touch configure.ac && autoconf
cd src && touch configure.ac && autoconf
cd utls && touch configure.ac && autoconf
-echo "don't forget to run configure."
install:
$(MKDIR) $(INCLUDEDIR) @libdir@ @bindir@
$(INSTALL) include/atmi/*.hpp $(INCLUDEDIR)
$(INSTALL) lib/$(LIBATMI) lib/$(LIBCLTATMI) lib/$(LIBFML) @libdir@
$(INSTALL) bin/* @bindir@
uninstall:
$(RM) -R $(INCLUDEDIR)
(cd @libdir@ && $(RM) ${LIBS})
(cd @bindir@ && $(RM) $(BINS))