- 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 %build
cd src/Unix 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 if [ -x /usr/bin/getconf ] ; then
NCPU=$(/usr/bin/getconf _NPROCESSORS_ONLN) NCPU=$(/usr/bin/getconf _NPROCESSORS_ONLN)
if [ $NCPU -eq 0 ] ; then if [ $NCPU -eq 0 ] ; then
@ -55,7 +55,7 @@ make -j $PARL
%install %install
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
cd src/Unix cd src/Unix
make prefix=%{_prefix} DESTDIR=${RPM_BUILD_ROOT} install make DESTDIR=${RPM_BUILD_ROOT} install
%clean %clean
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
@ -67,5 +67,3 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man1/BasiliskII.1 %{_mandir}/man1/BasiliskII.1
%{_datadir}/BasiliskII/keycodes %{_datadir}/BasiliskII/keycodes
%{_datadir}/BasiliskII/fbdevices %{_datadir}/BasiliskII/fbdevices
%changelog

View File

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

View File

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

View File

@ -623,10 +623,13 @@ void QuitEmulator(void)
ExitAll(); ExitAll();
// Free ROM/RAM areas // Free ROM/RAM areas
#if REAL_ADDRESSING || DIRECT_ADDRESSING #if REAL_ADDRESSING
if (memory_mapped_from_zero) if (memory_mapped_from_zero)
munmap((caddr_t)0x0000, mapped_ram_rom_size); 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); munmap((caddr_t)RAMBaseHost, mapped_ram_rom_size);
RAMBaseHost = NULL; RAMBaseHost = NULL;
} }