2013-08-23 02:57:00 +02:00
|
|
|
# $Id: Makefile,v 1.29 2008/12/11 12:18:17 ecd Exp $
|
|
|
|
#
|
|
|
|
|
2024-10-21 18:20:13 +02:00
|
|
|
SRC_DIR = ./src
|
2024-10-21 18:14:46 +02:00
|
|
|
|
2013-08-23 02:57:00 +02:00
|
|
|
X49GP_DEBUG = \
|
|
|
|
-DDEBUG_X49GP_MODULES \
|
|
|
|
-DDEBUG_S3C2410_SRAM \
|
|
|
|
-DDEBUG_S3C2410_MEMC \
|
|
|
|
-DDEBUG_S3C2410_INTC \
|
|
|
|
-DDEBUG_S3C2410_POWER \
|
|
|
|
-DDEBUG_S3C2410_LCD \
|
|
|
|
-DDEBUG_S3C2410_UART \
|
|
|
|
-DDEBUG_S3C2410_TIMER \
|
|
|
|
-DDEBUG_S3C2410_USBDEV \
|
|
|
|
-DDEBUG_S3C2410_WATCHDOG \
|
|
|
|
-DDEBUG_S3C2410_IO_PORT \
|
|
|
|
-DDEBUG_S3C2410_RTC \
|
|
|
|
-DDEBUG_S3C2410_ADC \
|
|
|
|
-DDEBUG_S3C2410_SDI \
|
|
|
|
-DDEBUG_S3C2410_SPI \
|
|
|
|
-DDEBUG_X49GP_SYSCALL \
|
|
|
|
-DDEBUG_X49GP_FLASH_READ \
|
|
|
|
-DDEBUG_X49GP_FLASH_WRITE \
|
|
|
|
-UDEBUG_X49GP_SYSRAM_READ \
|
|
|
|
-UDEBUG_X49GP_SYSRAM_WRITE \
|
|
|
|
-UDEBUG_X49GP_ERAM_READ \
|
|
|
|
-UDEBUG_X49GP_ERAM_WRITE \
|
|
|
|
-UDEBUG_X49GP_IRAM_READ \
|
|
|
|
-UDEBUG_X49GP_IRAM_WRITE \
|
|
|
|
-DDEBUG_X49GP_TIMER_IDLE \
|
|
|
|
-DDEBUG_X49GP_ARM_IDLE \
|
|
|
|
-DDEBUG_X49GP_ENABLE_IRQ \
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
-DDEBUG_X49GP_BLOCK \
|
|
|
|
-DDEBUG_X49GP_MAIN \
|
2013-08-23 02:57:00 +02:00
|
|
|
-DDEBUG_X49GP_UI
|
|
|
|
|
|
|
|
DEBUG = -g # -pg
|
|
|
|
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
IMAGE49GP = hp49g+.png
|
|
|
|
IMAGE50G = hp50g.png
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
QEMU_DEFINES = -DTARGET_ARM -DX49GP \
|
|
|
|
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
|
|
|
-fno-strict-aliasing
|
|
|
|
|
|
|
|
# Use this to debug
|
|
|
|
# DEFINES = $(X49GP_DEBUG) $(QEMU_DEFINES)
|
|
|
|
# Use this for speed
|
|
|
|
DEFINES = $(QEMU_DEFINES)
|
|
|
|
|
2024-10-21 20:45:12 +02:00
|
|
|
QEMU=src/qemu-git
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
QEMUMAKE = $(shell if [ "`uname -s`" = "Linux" -a "`uname -m`" = "sun4u" ]; then echo "sparc32 $(MAKE)"; else echo "$(MAKE)"; fi)
|
|
|
|
|
2017-10-26 15:42:01 +02:00
|
|
|
QEMU_DIR=$(QEMU)
|
2013-08-23 02:57:00 +02:00
|
|
|
QEMU_DIR_BUILD=$(QEMU_DIR)/arm-softmmu
|
|
|
|
QEMU_DEFINES+=-DNEED_CPU_H
|
2017-11-28 11:34:55 +01:00
|
|
|
QEMU_OBJS = $(QEMU_DIR_BUILD)/exec.o $(QEMU_DIR_BUILD)/translate-all.o $(QEMU_DIR_BUILD)/cpu-exec.o $(QEMU_DIR_BUILD)/translate.o $(QEMU_DIR_BUILD)/fpu/softfloat.o $(QEMU_DIR_BUILD)/op_helper.o $(QEMU_DIR_BUILD)/helper.o $(QEMU_DIR_BUILD)/disas.o $(QEMU_DIR_BUILD)/i386-dis.o $(QEMU_DIR_BUILD)/arm-dis.o $(QEMU_DIR_BUILD)/tcg/tcg.o $(QEMU_DIR_BUILD)/iwmmxt_helper.o $(QEMU_DIR_BUILD)/neon_helper.o
|
|
|
|
X49GP_LDFLAGS =
|
|
|
|
X49GP_LIBS = $(QEMU_OBJS)
|
2013-08-23 02:57:00 +02:00
|
|
|
QEMU_INCDIR=$(QEMU_DIR)
|
|
|
|
QEMU_INC=-I$(QEMU_INCDIR)/target-arm -I$(QEMU_INCDIR) -I$(QEMU_INCDIR)/fpu -I$(QEMU_INCDIR)/arm-softmmu
|
|
|
|
|
2024-10-21 18:14:46 +02:00
|
|
|
X49GP_INCLUDES = -I$(SRC_DIR)/include -I$(SRC_DIR)/bitmaps $(QEMU_INC)
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
INCLUDES = $(GDB_INCLUDES) $(X49GP_INCLUDES)
|
|
|
|
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
INSTALL_PREFIX = /usr/local
|
|
|
|
INSTALL_BINARY_DIR = "$(INSTALL_PREFIX)"/bin
|
|
|
|
INSTALL_DATA_DIR = "$(INSTALL_PREFIX)"/share/$(TARGET)
|
2021-12-02 16:18:08 +01:00
|
|
|
INSTALL_DOC_DIR = "$(INSTALL_PREFIX)"/doc/$(TARGET)
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
INSTALL_MENU_DIR = "$(INSTALL_PREFIX)"/share/applications
|
|
|
|
INSTALL_MAN_DIR = "$(INSTALL_PREFIX)/share/man/man1"
|
|
|
|
DEFINES += -DX49GP_DATADIR=\"$(INSTALL_DATA_DIR)\"
|
|
|
|
|
2013-08-23 02:57:00 +02:00
|
|
|
CC = gcc
|
|
|
|
LD = $(CC)
|
|
|
|
AR = ar
|
|
|
|
RANLIB = ranlib
|
|
|
|
|
|
|
|
CC += $(shell if [ "`uname -m`" = "sparc64" -o "`uname -m`" = "sun4u" ]; then echo "-mcpu=ultrasparc -m32"; fi)
|
|
|
|
|
|
|
|
COCOA_LIBS=$(shell if [ "`uname -s`" = "Darwin" ]; then echo "-F/System/Library/Frameworks -framework Cocoa -framework IOKit"; fi)
|
|
|
|
|
2021-10-31 14:10:00 +01:00
|
|
|
X49GP_CFLAGS = -O2 -Wall -Werror $(DEBUG) $(INCLUDES) $(DEFINES) -Wno-error=deprecated-declarations -Wno-error=stringop-overflow= -Wno-error=array-bounds
|
2018-08-28 18:56:10 +02:00
|
|
|
X49GP_LDFLAGS += $(DEBUG) $(GDB_LDFLAGS)
|
|
|
|
X49GP_LDLIBS = $(X49GP_LIBS) $(GDB_LIBS) $(COCOA_LIBS)
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
MAKEDEPEND = $(CC) -MM
|
|
|
|
|
2018-08-28 18:56:10 +02:00
|
|
|
X49GP_CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
|
|
|
|
X49GP_LDLIBS += $(shell pkg-config --libs gtk+-2.0) -lz -lm
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
LIBS = $(QEMU)
|
|
|
|
|
2024-10-21 18:14:46 +02:00
|
|
|
SRCS = $(SRC_DIR)/main.c \
|
|
|
|
$(SRC_DIR)/module.c \
|
|
|
|
$(SRC_DIR)/flash.c \
|
|
|
|
$(SRC_DIR)/sram.c \
|
|
|
|
$(SRC_DIR)/s3c2410.c \
|
|
|
|
$(SRC_DIR)/s3c2410_sram.c \
|
|
|
|
$(SRC_DIR)/s3c2410_memc.c \
|
|
|
|
$(SRC_DIR)/s3c2410_intc.c \
|
|
|
|
$(SRC_DIR)/s3c2410_power.c \
|
|
|
|
$(SRC_DIR)/s3c2410_lcd.c \
|
|
|
|
$(SRC_DIR)/s3c2410_nand.c \
|
|
|
|
$(SRC_DIR)/s3c2410_uart.c \
|
|
|
|
$(SRC_DIR)/s3c2410_timer.c \
|
|
|
|
$(SRC_DIR)/s3c2410_usbdev.c \
|
|
|
|
$(SRC_DIR)/s3c2410_watchdog.c \
|
|
|
|
$(SRC_DIR)/s3c2410_io_port.c \
|
|
|
|
$(SRC_DIR)/s3c2410_rtc.c \
|
|
|
|
$(SRC_DIR)/s3c2410_adc.c \
|
|
|
|
$(SRC_DIR)/s3c2410_spi.c \
|
|
|
|
$(SRC_DIR)/s3c2410_sdi.c \
|
|
|
|
$(SRC_DIR)/s3c2410_arm.c \
|
|
|
|
$(SRC_DIR)/ui.c \
|
|
|
|
$(SRC_DIR)/timer.c \
|
|
|
|
$(SRC_DIR)/tiny_font.c \
|
|
|
|
$(SRC_DIR)/symbol.c \
|
|
|
|
$(SRC_DIR)/gdbstub.c \
|
|
|
|
$(SRC_DIR)/block.c
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
|
|
|
|
# TEMPO hack
|
2024-10-21 18:14:46 +02:00
|
|
|
VVFATOBJS = $(SRC_DIR)/block-vvfat.o \
|
|
|
|
$(SRC_DIR)/block-qcow.o \
|
|
|
|
$(SRC_DIR)/block-raw.o
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
VVFATOBJS += $(QEMU_DIR)/cutils.o
|
|
|
|
|
|
|
|
TARGET = x49gp
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
TARGET_ALLCAPS = X49GP
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
all: do-it-all
|
|
|
|
|
|
|
|
ifeq (.depend,$(wildcard .depend))
|
|
|
|
include .depend
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
do-it-all: $(QEMU) $(TARGET)
|
2013-08-23 02:57:00 +02:00
|
|
|
else
|
|
|
|
do-it-all: depend-and-build
|
|
|
|
endif
|
|
|
|
|
2017-11-28 11:34:55 +01:00
|
|
|
$(TARGET): $(OBJS) $(VVFATOBJS) $(QEMU_OBJS)
|
2018-08-28 18:56:10 +02:00
|
|
|
$(CC) $(LDFLAGS) $(X49GP_LDFLAGS) -o $@ $(OBJS) $(VVFATOBJS) $(LDLIBS) $(X49GP_LDLIBS)
|
2013-08-23 02:57:00 +02:00
|
|
|
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
install: all $(TARGET).desktop $(TARGET).man
|
2021-10-31 12:49:17 +01:00
|
|
|
install -D -m 755 $(TARGET) "$(DESTDIR)$(INSTALL_BINARY_DIR)/$(TARGET)"
|
|
|
|
install -D -m 644 $(IMAGE49GP) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(IMAGE49GP)"
|
|
|
|
install -D -m 644 $(IMAGE50G) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(IMAGE50G)"
|
2024-10-21 22:05:53 +02:00
|
|
|
install -D -m 755 pull-firmware.sh "$(DESTDIR)$(INSTALL_DATA_DIR)/pull-firmware.sh"
|
2021-10-31 12:49:17 +01:00
|
|
|
install -D -m 644 $(TARGET).desktop "$(DESTDIR)$(INSTALL_MENU_DIR)/$(TARGET).desktop"
|
|
|
|
install -D -m 644 $(TARGET).man "$(DESTDIR)$(INSTALL_MAN_DIR)/$(TARGET).1"
|
On behalf of: 3298 - Applied 23 patches by 3298:
Misc changes, mostly fixes:
- fix ./newconfig systems other than OSX (broke in c8b823f)
- fix palette usage in 2-bit color mode (was broken ever since grayscale was implemented in 18e1003 and its improperly attributed copy f7913eb)
- fix continuing from breakpoints in the debugger (never worked, was exposed when the debugger was enabled in 9c1f2ed)
- restore the printf statements commented out in 9c1f2ed and hide them with #ifdefs instead
- close the server socket after accepting a debugger connection to allow another simultaneous debug session to be started using the same TCP port
- use the symbolic constant DEFAULT_GDBSTUB_PORT (already defined in gdb_stub.h as 1234) when starting the gdb server in main.c in place of the raw number 1234
- change Makefile to read the name of the firmware file from the file update.scp instead of hardcoding it; this allows users to switch to another firmware
by simply pasting it along with its accompanying update.scp into the x49gp directory
- Enhance port G (keyboard) handling to remember the value of output bits across periods with these bits configured as input
This fixes interaction with HPGCC3 keyboard routines, and it also fixes keys with eint==7 (assuming the stock firmware is in use)
needing a double-tap to work unless pressed very shortly after another keypress (the latter broke in b5f93ed)
- Get rid of the deprecated function warning by switching from gdk_pixbuf_new_from_inline to gdk_pixbuf_new_from_data (based on code by chwdt)
- Delete remaining now-redundant CVS files
- Don't release all buttons anymore if there are still physical keys and/or the left mouse button are holding some down
On the other hand, forcibly release all buttons when losing focus to avoid getting stuck in a state with buttons down
when they are not held down by anything; this would happen due to missed events while not in focus
- Add a context menu to the screen, containing only "Reset" and "Quit" items for now
- Ensure that the files backing flash, sram, and s3c2410-sram exist and have the correct size when opening them
Note that if the flash file does not exist, this will not fill it with the code that's supposed to be in there, obviously causing the calculator to crash. That's an improvement for later.
- Allow the config system to fill not only numbers, but also strings (including filenames) with default values
basename is excluded, but it's planned to be dropped entirely.
- Add an "install" target to the Makefile
- Implement a more generic command-line parser for substantially improved flexibility
- Also adds a proper help option, though the manual referenced in the corresponding output (a manpage, hopefully) does not exist yet.
- Drop the "basename" config property in favor of interpreting relative paths in the config as relative to the config file's location
- Retire the "image" config property in favor of simply loading the image from next to the binary or from the install directory
- Split the UI name property into name (affecting only the window title) and type (affecting the UI image and in the future also the default bootcode) properties
- Change the default calculator type to the 50g everywhere, which probably matches today's user expectations better than the 49g+.
- Create a flash file from the calculator model's appropriate boot file if it does not exist, relying on the bootcode to detect the absence of a firmware
The bootcode will complain about the missing firmware and enter update mode, so the user needs to supply their favorite firmware version and point the bootcode's updater to it.
The easiest way is probably pointing the emulated SD card at a directory containing the firmware and its accompanying update.scp file, and then starting the SD-based update.
- Add SD mount / unmount options to the right-click / menu-key popup menu
- Remove most of the old script-based config-generating system since the binary now has these capabilities as well
- Add an applications menu item for installing
- Keep some debug output on stderr and a huge vvfat.log file from showing up when not debugging x49gp itself
- Allow (re-)connecting a debugger to a running session
This is done through the right-click / menu-key popup menu.
To avoid confusion due to the accidental clicks leading to an unresponsive interface (caused by waiting for the debugger to connect),
this option is hidden unless option -d or its new companion -D (same as -d, but does not start the debug interface right away) is present.
- Improved support for hardware keyboards
- Update README.md, add manpage, rename other README files to TODO to reflect their contents
2018-05-07 23:32:14 +02:00
|
|
|
|
|
|
|
$(TARGET).desktop: x49gp.desktop.in
|
|
|
|
perl -p -e "s!TARGET!$(TARGET)!" <x49gp.desktop.in >$@
|
|
|
|
|
|
|
|
$(TARGET).man: x49gp.man.in
|
|
|
|
perl -p -e "s!TARGET_ALLCAPS!$(TARGET_ALLCAPS)!;" -e "s!TARGET!$(TARGET)!" <x49gp.man.in >$@
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
sdcard:
|
|
|
|
ifeq ($(shell uname),Darwin)
|
|
|
|
rm -f sdcard.dmg
|
|
|
|
hdiutil create sdcard -megabytes 64 -fs MS-DOS -volname x49gp
|
|
|
|
else
|
|
|
|
/sbin/mkdosfs -v -C -S 512 -f 2 -F 16 -r 512 -R 2 -n "x49gp" $@ 65536
|
|
|
|
endif
|
|
|
|
|
|
|
|
sim: dummy
|
|
|
|
$(MAKE) -C $@
|
|
|
|
|
2018-08-28 18:42:54 +02:00
|
|
|
$(QEMU)/config-host.h:
|
2017-12-07 12:57:12 +01:00
|
|
|
+( cd $(QEMU); \
|
2013-08-23 02:57:00 +02:00
|
|
|
./configure-small --extra-cflags=-DX49GP; \
|
2017-12-07 12:57:12 +01:00
|
|
|
$(QEMUMAKE) -f Makefile-small )
|
2013-08-23 02:57:00 +02:00
|
|
|
|
2017-11-28 11:34:55 +01:00
|
|
|
$(QEMU_OBJS): _dir_qemu
|
|
|
|
|
2017-10-26 15:42:01 +02:00
|
|
|
_dir_qemu: dummy
|
|
|
|
+$(QEMUMAKE) -C $(QEMU) -f Makefile-small
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
%.o: %.c
|
2018-08-28 18:56:10 +02:00
|
|
|
$(CC) $(CFLAGS) $(X49GP_CFLAGS) -o $@ -c $<
|
2013-08-23 02:57:00 +02:00
|
|
|
|
2024-10-21 18:20:13 +02:00
|
|
|
$(SRC_DIR)/block-vvfat.o: $(SRC_DIR)/block-vvfat.c
|
2018-08-28 18:56:10 +02:00
|
|
|
$(CC) $(CFLAGS) $(X49GP_CFLAGS) -fno-aggressive-loop-optimizations -o $@ -c $<
|
2017-10-26 11:41:01 +02:00
|
|
|
|
2013-08-23 02:57:00 +02:00
|
|
|
clean-qemu:
|
|
|
|
$(MAKE) -C $(QEMU) -f Makefile-small clean
|
|
|
|
|
|
|
|
clean: clean-qemu
|
2024-10-21 18:20:13 +02:00
|
|
|
rm -f $(SRC_DIR)/*.o core *~ .depend
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(MAKE) -C $(QEMU) -f Makefile-small distclean
|
2018-08-28 18:32:34 +02:00
|
|
|
rm -f $(TARGET) $(TARGET).desktop $(TARGET).man
|
2013-08-23 02:57:00 +02:00
|
|
|
|
|
|
|
depend-libs: $(QEMU)/config-host.h
|
|
|
|
|
|
|
|
depend-and-build: depend
|
|
|
|
$(MAKE) -C . all
|
|
|
|
|
|
|
|
depend: depend-libs
|
2018-08-28 18:56:10 +02:00
|
|
|
$(MAKEDEPEND) $(CFLAGS) $(X49GP_CFLAGS) $(SRCS) >.depend
|
2013-08-23 02:57:00 +02:00
|
|
|
|
2024-10-21 18:14:46 +02:00
|
|
|
mrproper: clean-qemu distclean
|
|
|
|
|
2024-10-21 18:00:55 +02:00
|
|
|
pretty-code:
|
2024-10-21 22:16:05 +02:00
|
|
|
clang-format -i $(SRC_DIR)/*.c $(SRC_DIR)/*.h
|
2024-10-21 18:00:55 +02:00
|
|
|
|
2024-10-21 20:42:42 +02:00
|
|
|
pull-firmware:
|
|
|
|
./pull-firmware.sh
|
|
|
|
|
2013-08-23 02:57:00 +02:00
|
|
|
dummy:
|