3 # Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
4 # Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
6 # This Makefile.in is free software; the author
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 ### The configure script will replace these variables.
22 top_srcdir
= @top_srcdir@
25 exec_prefix = @
exec_prefix@
29 libexecdir
= @libexecdir@
31 sysconfdir
= @sysconfdir@
32 sharedstatedir
= @sharedstatedir@
33 localstatedir
= @localstatedir@
37 includedir = @
includedir@
38 pkgdatadir
= $(datadir)/@PACKAGE_TARNAME@
/$(host_cpu
)-$(host_vendor
)
39 pkglibdir
= $(libdir)/@PACKAGE_TARNAME@
41 PACKAGE_NAME
= @PACKAGE_NAME@
42 PACKAGE_TARNAME
= @PACKAGE_TARNAME@
43 PACKAGE_VERSION
= @PACKAGE_VERSION@
44 PACKAGE_STRING
= @PACKAGE_STRING@
45 PACKAGE_BUGREPORT
= @PACKAGE_BUGREPORT@
48 host_vendor
= @host_vendor@
51 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
52 INSTALL_DATA
= @INSTALL_DATA@
53 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
54 INSTALL_STRIP_PROGRAM
= @INSTALL_STRIP_PROGRAM@
56 mkinstalldirs
= $(srcdir)/mkinstalldirs
60 CPPFLAGS
= -I.
-Iinclude
-I
$(srcdir)/include -Wall
-W
63 BUILD_CPPFLAGS
= -I.
-Iinclude
-I
$(srcdir)/include -Wall
-W \
64 -DPUPA_DATADIR
=\"$(pkgdatadir
)\"
71 ### General variables.
73 RMKFILES
= $(addprefix conf
/,i386-pc.rmk
)
74 MKFILES
= $(patsubst %.rmk
,%.mk
,$(RMKFILES
))
76 COMMON_DISTFILES
= AUTHORS COPYING ChangeLog INSTALL NEWS README \
77 THANKS TODO Makefile.in aclocal.m4 autogen.sh config.guess \
78 config.h.in config.sub configure configure.ac genkernsyms.sh \
79 genmk.rb genmodsrc.sh gensymlist.sh install-sh mkinstalldirs \
82 BOOT_DISTFILES
= $(addprefix boot
/i386
/pc/,boot.S diskboot.S
)
84 CONF_DISTFILES
= $(RMKFILES
) $(MKFILES
)
86 DISK_DISTFILES
= $(addprefix disk
/i386
/pc/,biosdisk.c partition.c
)
88 FS_DISTFILES
= $(addprefix fs
/,fat.c
)
90 INCLUDE_DISTFILES
= $(addprefix include/pupa
/,boot.h device.h disk.h \
91 dl.h elf.h err.h file.h fs.h kernel.h loader.h misc.h mm.h \
92 net.h rescue.h symbol.h term.h types.h
) \
93 $(addprefix include/pupa
/util
/,misc.h resolve.h
) \
94 include/pupa
/i386
/types.h \
95 $(addprefix include/pupa
/i386
/pc/,biosdisk.h boot.h \
96 console.h init.h kernel.h loader.h memory.h partition.h
) \
97 $(addprefix include/pupa
/i386
/pc/util
/,biosdisk.h
)
99 KERN_DISTFILES
= $(addprefix kern
/,device.c disk.c dl.c err.c file.c \
100 fs.c loader.c main.c misc.c mm.c rescue.c term.c
) \
102 $(addprefix kern
/i386
/pc/,init.c startup.S
)
104 LOADER_DISTFILES
= $(addprefix loader
/i386
/pc/,chainloader.c
)
106 TERM_DISTFILES
= $(addprefix term
/i386
/pc/,console.c
)
108 UTIL_DISTFILES
= $(addprefix util
/,genmoddep.c misc.c resolve.c
) \
109 $(addprefix util
/i386
/pc/,biosdisk.c pupa-mkimage.c \
112 DISTFILES
= $(COMMON_DISTFILES
) $(BOOT_DISTFILES
) $(CONF_DISTFILES
) \
113 $(DISK_DISTFILES
) $(FS_DISTFILES
) $(INCLUDE_DISTFILES
) \
114 $(KERN_DISTFILES
) $(LOADER_DISTFILES
) $(TERM_DISTFILES
) \
117 DATA
= $(pkgdata_IMAGES
) $(pkgdata_MODULES
)
118 PROGRAMS
= $(bin_UTILITIES
) $(sbin_UTILITIES
)
123 DISTCLEANFILES
= config.status config.cache config.log config.h \
124 Makefile stamp-h
include/pupa
/cpu
include/pupa
/machine
125 MAINTAINER_CLEANFILES
= $(srcdir)/configure
$(addprefix $(srcdir)/,$(MKFILES
))
127 # The default target.
130 ### Include an arch-specific Makefile.
131 $(addprefix $(srcdir)/,$(MKFILES
)): %.mk
: %.rmk genmk.rb
132 if
test "x$(RUBY)" = x
; then \
135 $(RUBY
) $(srcdir)/genmk.rb
< $< > $@
; \
138 include $(srcdir)/conf
/$(host_cpu
)-$(host_vendor
).mk
142 all-local
: $(PROGRAMS
) $(DATA
) $(SCRIPTS
)
144 install: install-local
147 $(mkinstalldirs
) $(DESTDIR
)$(pkgdatadir
)
148 @list
='$(pkgdata_IMAGES) $(pkgdata_MODULES)'; for file in
$$list; do \
149 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)"; fi
; \
150 dest
="`echo $$file | sed 's,.*/,,'`"; \
151 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkgdatadir
)/$$dest; \
153 $(mkinstalldirs
) $(DESTDIR
)$(bindir)
154 @list
='$(bin_UTILITIES)'; for file in
$$list; do \
155 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)"; fi
; \
156 dest
="`echo $$file | sed 's,.*/,,'`"; \
157 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
159 $(mkinstalldirs
) $(DESTDIR
)$(sbindir
)
160 @list
='$(sbin_UTILITIES)'; for file in
$$list; do \
161 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)"; fi
; \
162 dest
="`echo $$file | sed 's,.*/,,'`"; \
163 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
167 $(MAKE
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" install
170 @list
='$(pkgdata_IMAGES) $(pkgdata_MODULES)'; for file in
$$list; do \
171 dest
="`echo $$file | sed 's,.*/,,'`"; \
172 rm -f
$(DESTDIR
)$(pkgdatadir
)/$$dest; \
174 @list
='$(bin_UTILITIES)'; for file in
$$list; do \
175 dest
="`echo $$file | sed 's,.*/,,'`"; \
176 rm -f
$(DESTDIR
)$(bindir)/$$dest; \
178 @list
='$(sbin_UTILITIES)'; for file in
$$list; do \
179 dest
="`echo $$file | sed 's,.*/,,'`"; \
180 rm -f
$(DESTDIR
)$(sbindir
)/$$dest; \
184 -test -z
"$(CLEANFILES)" ||
rm -f
$(CLEANFILES
)
187 -test -z
"$(MOSTLYCLEANFILES)" ||
rm -f
$(MOSTLYCLEANFILES
)
189 distclean: mostlyclean
190 -test -z
"$(DISTCLEANFILES)" ||
rm -f
$(DISTCLEANFILES
)
191 -rm -rf
$(srcdir)/autom4te.cache
193 maintainer-clean
: distclean
194 -test -z
"$(MAINTAINER_CLEANFILES)" ||
rm -f
$(MAINTAINER_CLEANFILES
)
200 distdir
=$(PACKAGE_TARNAME
)-$(PACKAGE_VERSION
)
202 distdir
: $(DISTFILES
)
203 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
204 $(mkinstalldirs
) $(distdir
)
205 for i in
$(DISTFILES
); do \
206 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
207 if
test -d
$(srcdir)/$$dir; then \
208 $(mkinstalldirs
) $(distdir
)/$$dir; \
210 cp
-p
$(srcdir)/$$i $(distdir
)/$$i || exit
1; \
212 chmod
-R a
+r
$(distdir
)
217 tar chof
- $(distdir
) | GZIP
=$(GZIP_ENV
) gzip
-c
>$(distdir
).
tar.gz
218 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
221 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
222 GZIP
=$(GZIP_ENV
) gzip
-cd
$(distdir
).
tar.gz |
tar xf
-
223 chmod
-R a-w
$(distdir
)
225 mkdir
$(distdir
)/=build
226 mkdir
$(distdir
)/=inst
228 dc_instdir
=`CDPATH=: && cd $(distdir)/=inst && pwd` \
229 && cd
$(distdir
)/=build \
230 && ..
/configure
--srcdir=..
--prefix=$$dc_instdir \
231 && $(MAKE
) all dvi check install uninstall \
232 && (test `find $$dc_instdir -type f -print | wc -l` -le
1 \
233 ||
(echo
"Error: files left after uninstall" 1>&2; \
235 && $(MAKE
) dist distclean \
236 && rm -f
$(distdir
).
tar.gz \
237 && (test `find . -type f -print | wc -l` -eq
0 \
238 ||
(echo
"Error: files left after distclean" 1>&2; \
240 -chmod
-R a
+w
$(distdir
) > /dev
/null
2>&1; rm -rf
$(distdir
)
241 @echo
"$(distdir).tar.gz is ready for distribution" | \
242 sed
'h;s/./=/g;p;x;p;x'
249 # Regenerate configure and Makefile automatically.
250 $(srcdir)/configure
: configure.ac aclocal.m4
251 cd
$(srcdir) && autoconf
253 $(srcdir)/config.h.in
: stamp-h.in
254 $(srcdir)/stamp-h.in
: configure.ac aclocal.m4
255 cd
$(srcdir) && autoheader
256 echo timestamp
> $(srcdir)/stamp-h.in
259 stamp-h
: config.h.in config.status
262 Makefile
: Makefile.in config.status
265 config.status
: configure
266 .
/config.status
--recheck
268 .PHONY
: all install install-strip
uninstall clean mostlyclean distclean
269 .PHONY
: maintainer-clean
info dvi dist check
271 # Prevent an overflow.