1
0
Fork 0
forked from Miroirs/x49gp

Merge pull request #1 from gwenhael-le-moine/main

fix compilation on my system (gcc 11.2.0) and add DESTDIR in Makefile
This commit is contained in:
Claudio L 2021-11-17 16:53:09 -05:00 committed by GitHub
commit e8aeadc974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View file

@ -82,7 +82,7 @@ CC += $(shell if [ "`uname -m`" = "sparc64" -o "`uname -m`" = "sun4u" ]; then ec
COCOA_LIBS=$(shell if [ "`uname -s`" = "Darwin" ]; then echo "-F/System/Library/Frameworks -framework Cocoa -framework IOKit"; fi)
X49GP_CFLAGS = -O2 -Wall -Werror $(DEBUG) $(INCLUDES) $(DEFINES)
X49GP_CFLAGS = -O2 -Wall -Werror $(DEBUG) $(INCLUDES) $(DEFINES) -Wno-error=deprecated-declarations -Wno-error=stringop-overflow= -Wno-error=array-bounds
X49GP_LDFLAGS += $(DEBUG) $(GDB_LDFLAGS)
X49GP_LDLIBS = $(X49GP_LIBS) $(GDB_LIBS) $(COCOA_LIBS)
@ -138,13 +138,13 @@ $(TARGET): $(OBJS) $(VVFATOBJS) $(QEMU_OBJS)
$(CC) $(LDFLAGS) $(X49GP_LDFLAGS) -o $@ $(OBJS) $(VVFATOBJS) $(LDLIBS) $(X49GP_LDLIBS)
install: all $(TARGET).desktop $(TARGET).man
install -D -m 755 $(TARGET) "$(INSTALL_BINARY_DIR)/$(TARGET)"
install -D -m 644 $(BOOT49GP) "$(INSTALL_DATA_DIR)/$(BOOT49GP)"
install -D -m 644 $(BOOT50G) "$(INSTALL_DATA_DIR)/$(BOOT50G)"
install -D -m 644 $(IMAGE49GP) "$(INSTALL_DATA_DIR)/$(IMAGE49GP)"
install -D -m 644 $(IMAGE50G) "$(INSTALL_DATA_DIR)/$(IMAGE50G)"
install -D -m 644 $(TARGET).desktop "$(INSTALL_MENU_DIR)/$(TARGET).desktop"
install -D -m 644 $(TARGET).man "$(INSTALL_MAN_DIR)/$(TARGET).1"
install -D -m 755 $(TARGET) "$(DESTDIR)$(INSTALL_BINARY_DIR)/$(TARGET)"
install -D -m 644 $(BOOT49GP) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(BOOT49GP)"
install -D -m 644 $(BOOT50G) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(BOOT50G)"
install -D -m 644 $(IMAGE49GP) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(IMAGE49GP)"
install -D -m 644 $(IMAGE50G) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(IMAGE50G)"
install -D -m 644 $(TARGET).desktop "$(DESTDIR)$(INSTALL_MENU_DIR)/$(TARGET).desktop"
install -D -m 644 $(TARGET).man "$(DESTDIR)$(INSTALL_MAN_DIR)/$(TARGET).1"
$(TARGET).desktop: x49gp.desktop.in
perl -p -e "s!TARGET!$(TARGET)!" <x49gp.desktop.in >$@

View file

@ -81,7 +81,7 @@ ar="${cross_prefix}${ar}"
ld="${cross_prefix}${ld}"
# default flags for all hosts
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS -Wno-error=array-bounds"
CFLAGS="-g $CFLAGS"
QEMU_CFLAGS="-Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
@ -96,7 +96,7 @@ int main(void) { }
EOF
for flag in $gcc_flags; do
if compile_prog "$QEMU_CFLAGS" "$flag" ; then
QEMU_CFLAGS="$flag $QEMU_CFLAGS"
QEMU_CFLAGS="$flag $QEMU_CFLAGS"
fi
done
@ -771,9 +771,9 @@ fi
# enable/disable
if test -z "$zero_malloc" ; then
if test "$z_version" = "50" ; then
zero_malloc="no"
zero_malloc="no"
else
zero_malloc="yes"
zero_malloc="yes"
fi
fi