-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
60 lines (44 loc) · 1.63 KB
/
Makefile
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
TOPDIR=.
include ./Config
SUBDIRS = src/jpcsc src/samples
ZIPDIR=${BUILDDIR}/zip
all bins clean ::
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@; \
done
test tool testbin toolbin:
$(MAKE) -C src/samples $@
install:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@; \
done
cp README License.html ${DOC_INSTALL_DIR}
# build jpcsc-${VERSION}.zip inclusing sources and binaries
zippkg: bins
rm -rf ${ZIPDIR}/jpcsc jpcsc-${JPCSC_VERSION}.zip
mkdir -p ${ZIPDIR}/jpcsc
cp -r bin apidoc misc debian src jpcsc.spec Config License.html Makefile README ${ZIPDIR}/jpcsc
find ${ZIPDIR} -name "*~" -exec rm -rf \{} \; || true
find ${ZIPDIR} -name "CVS" -exec rm -rf \{} \; || true
find ${ZIPDIR} -name ".#*" -exec rm -rf \{} \; || true
cd ${ZIPDIR} && zip -rq jpcsc-${JPCSC_VERSION}.zip jpcsc
# build jpcsc-${VERSION}-src.zip inclusing sources
srcpkg: bins
rm -rf ${ZIPDIR}/jpcsc jpcsc-${JPCSC_VERSION}-src.zip
mkdir -p ${ZIPDIR}/jpcsc
cp -r apidoc misc debian src jpcsc.spec Config License.html Makefile README ${ZIPDIR}/jpcsc
find ${ZIPDIR} -name "*~" -exec rm -rf \{} \; || true
find ${ZIPDIR} -name "CVS" -exec rm -rf \{} \; || true
find ${ZIPDIR} -name ".#*" -exec rm -rf \{} \; || true
cd ${ZIPDIR} && zip -rq jpcsc-${JPCSC_VERSION}-src.zip jpcsc
rpmpkgs: zippkg
cp ${ZIPDIR}/jpcsc-${JPCSC_VERSION}.zip ${RPM_BUILD_DIR}/SOURCES
cp jpcsc.spec ${RPM_BUILD_DIR}/SPECS
rpmbuild -ba ${RPM_BUILD_DIR}/SPECS/jpcsc.spec
FILES=$(filter-out build,$(wildcard *))
DEBDIR=${BUILDDIR}/debian/jpcsc-${JPCSC_VERSION}
debpkg:
mkdir -p ${DEBDIR}
rm -rf ${DEBDIR}/*
cp -r ${FILES} ${DEBDIR}
cd ${DEBDIR} && dpkg-buildpackage -rfakeroot