Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
139 lines (117 loc) · 3.73 KB
/
Copy pathMakefile
File metadata and controls
139 lines (117 loc) · 3.73 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Makefile for DOSEMU
#
all: default
srcdir=.
top_builddir=.
ifeq ($(filter deb rpm flatpak-% %/configure configure,$(MAKECMDGOALS)),)
ifneq ($(wildcard Makefile.conf),)
include Makefile.conf
else
$(warning unconfigured, assuming in-tree build)
top_srcdir = $(abspath $(srcdir))
top_builddir = $(abspath $(srcdir))
endif
endif
REALTOPDIR ?= $(abspath $(srcdir))
$(REALTOPDIR)/configure configure: $(REALTOPDIR)/configure.ac
cd $(@D) && autoreconf --install -v
$(top_srcdir)/config.hh.in: $(REALTOPDIR)/configure.ac
cd $(@D) && autoheader
$(top_builddir)/config.status: $(REALTOPDIR)/configure
ifeq ($(findstring $(MAKECMDGOALS), clean realclean pristine distclean),)
@echo "Running configure ..."
$<
else
$< || true
endif
touch $@
config.hh: $(top_srcdir)/config.hh.in | $(top_builddir)/config.status
$(top_builddir)/config.status
touch $@
Makefile.conf: $(top_srcdir)/Makefile.conf.in | $(top_builddir)/config.status
$(top_builddir)/config.status
etc/dosemu.desktop: $(top_srcdir)/etc/dosemu.desktop.in | $(top_builddir)/config.status
$(top_builddir)/config.status
default install: $(top_builddir)/config.status config.hh etc/dosemu.desktop
@$(MAKE) -C man $@
@$(MAKE) -C src $@
clean realclean:
rm -f $(top_builddir)/config.hh
rm -f $(top_builddir)/version.hh
rm -f $(top_builddir)/src/include/config.hh
rm -f $(top_builddir)/src/include/config.hh.in
rm -f $(top_builddir)/src/include/version.hh
@$(MAKE) -C man $@
@$(MAKE) -C src $@
uninstall:
@$(MAKE) -C src uninstall
docs:
@$(MAKE) -C src/doc all
@$(MAKE) -C src/doc install
docsclean:
@$(MAKE) -C src/doc clean
GIT_REV := $(shell $(REALTOPDIR)/git-rev.sh $(REALTOPDIR) $(top_builddir))
.LOW_RESOLUTION_TIME: $(GIT_REV)
$(PACKETNAME).tar.gz: $(GIT_REV) changelog
rm -f $(PACKETNAME).tar.gz
(cd $(REALTOPDIR); git archive -o $(abs_top_builddir)/$(PACKETNAME).tar --prefix=$(PACKETNAME)/ HEAD)
tar rf $(PACKETNAME).tar --transform 's,^,$(PACKETNAME)/,' --add-file=changelog; \
if [ -f "$(fdtarball)" ]; then \
tar -Prf $(PACKETNAME).tar --transform 's,^$(dir $(fdtarball)),$(PACKETNAME)/,' --add-file=$(fdtarball); \
fi
gzip $(PACKETNAME).tar
dist: $(PACKETNAME).tar.gz
rpm: dosemu2.spec
tito build --test --rpm
deb:
debuild -i -us -uc -b
changelog:
if [ -d $(top_srcdir)/.git -o -f $(top_srcdir)/.git ]; then \
git --git-dir=$(top_srcdir)/.git log >$@ ; \
else \
echo "Unofficial build by `whoami`, `date`" >$@ ; \
fi
log: changelog
tests:
python3 test/test_dosemu.py PPDOSGITTestCase
pristine distclean mrproper: Makefile.conf docsclean
@$(MAKE) -C src pristine
rm -f Makefile.conf
rm -f $(PACKETNAME).tar.gz
rm -f ChangeLog
rm -f `find . -name config.cache`
rm -f `find . -name config.status`
rm -f `find . -name config.log`
rm -f `find . -name aclocal.m4`
rm -f `find . -name configure`
rm -f `find . -name Makefile.conf`
rm -rf `find . -name autom4te*.cache`
rm -rf debian/$(PACKAGE_NAME)-dev
rm -rf debian/tmp
rm -rf debian/.debhelper
rm -f debian/*-stamp
rm -f debian/files
rm -f config.hh
rm -f src/include/stamp-h1
rm -f config.hh.in
rm -f version.hh
rm -f `find . -name '*~'`
rm -f `find . -name '*[\.]o'`
rm -f `find src -type f -name '*.d'`
rm -f `find . -name '*[\.]orig'`
rm -f `find . -name '*[\.]rej'`
rm -f gen*.log
rm -f config.sub config.guess
rm -rf 2.*
rm -rf autom4te.cache
$(REALTOPDIR)/scripts/mkpluginhooks clean
tar: distclean
VERSION=`cat VERSION` && cd .. && tar czvf dosemu-$$VERSION.tgz dosemu-$$VERSION
flatpak-build:
git clean -fx
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak-builder --ccache --force-clean --user --repo=repo \
--install-deps-from=flathub \
--install builddir io.github.dosemu2.dosemu2.yml
flatpak-run:
flatpak run io.github.dosemu2.dosemu2