- updated spec file

- make install/uninstall targets support DESTDIR variable
- fixed compilation problem with DIRECT_ADDRESSING
This commit is contained in:
cebix 2000-10-10 18:54:34 +00:00
parent b6d5ab3477
commit b07af7f239
4 changed files with 20 additions and 16 deletions

View File

@ -40,7 +40,7 @@ Some features of Basilisk II:
%build
cd src/Unix
./configure --prefix=%{_prefix}
CFLAGS=${RPM_OPT_FLAGS} CXXFLAGS=${RPM_OPT_FLAGS} ./configure --prefix=%{_prefix} --mandir=%{_mandir}
if [ -x /usr/bin/getconf ] ; then
NCPU=$(/usr/bin/getconf _NPROCESSORS_ONLN)
if [ $NCPU -eq 0 ] ; then
@ -55,7 +55,7 @@ make -j $PARL
%install
rm -rf ${RPM_BUILD_ROOT}
cd src/Unix
make prefix=%{_prefix} DESTDIR=${RPM_BUILD_ROOT} install
make DESTDIR=${RPM_BUILD_ROOT} install
%clean
rm -rf ${RPM_BUILD_ROOT}
@ -67,5 +67,3 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man1/BasiliskII.1
%{_datadir}/BasiliskII/keycodes
%{_datadir}/BasiliskII/fbdevices
%changelog

View File

@ -11,6 +11,8 @@ datadir = @datadir@
mandir = @mandir@
man1dir = $(mandir)/man1
DESTDIR =
CC = @CC@
CXX = @CXX@
CFLAGS = @CFLAGS@
@ -37,7 +39,7 @@ SRCS = ../main.cpp main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp
APP = BasiliskII
## Rules
.PHONY: modules install uninstall clean distclean depend dep
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
.SUFFIXES:
.SUFFIXES: .c .cpp .s .o .h
@ -64,20 +66,20 @@ modules:
cd Linux/NetDriver; make
install: $(APP) installdirs
$(INSTALL_PROGRAM) $(APP) $(bindir)/$(APP)
-$(INSTALL_DATA) $(APP).1 $(man1dir)/$(APP).1
$(INSTALL_DATA) keycodes $(datadir)/$(APP)/keycodes
$(INSTALL_DATA) fbdevices $(datadir)/$(APP)/fbdevices
$(INSTALL_PROGRAM) $(APP) $(DESTDIR)$(bindir)/$(APP)
-$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1
$(INSTALL_DATA) keycodes $(DESTDIR)$(datadir)/$(APP)/keycodes
$(INSTALL_DATA) fbdevices $(DESTDIR)$(datadir)/$(APP)/fbdevices
installdirs:
$(SHELL) mkinstalldirs $(bindir) $(man1dir) $(datadir)/$(APP)
uninstall:
rm -f $(bindir)/$(APP)
rm -f $(man1dir)/$(APP).1
rm -f $(datadir)/$(APP)/keycodes
rm -f $(datadir)/$(APP)/fbdevices
rmdir $(datadir)/$(APP)
rm -f $(DESTDIR)$(bindir)/$(APP)
rm -f $(DESTDIR)$(man1dir)/$(APP).1
rm -f $(DESTDIR)$(datadir)/$(APP)/keycodes
rm -f $(DESTDIR)$(datadir)/$(APP)/fbdevices
rmdir $(DESTDIR)$(datadir)/$(APP)
mostlyclean:
rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak

View File

@ -1,4 +1,5 @@
#! /bin/sh
aclocal
autoheader
autoconf
./configure $*

View File

@ -623,10 +623,13 @@ void QuitEmulator(void)
ExitAll();
// Free ROM/RAM areas
#if REAL_ADDRESSING || DIRECT_ADDRESSING
#if REAL_ADDRESSING
if (memory_mapped_from_zero)
munmap((caddr_t)0x0000, mapped_ram_rom_size);
else if (RAMBaseHost != (uint8 *)MAP_FAILED) {
else
#endif
#if REAL_ADDRESSING || DIRECT_ADDRESSING
if (RAMBaseHost != (uint8 *)MAP_FAILED) {
munmap((caddr_t)RAMBaseHost, mapped_ram_rom_size);
RAMBaseHost = NULL;
}