add standalone Makefile & config.h to build without autotools
This commit is contained in:
parent
a18949bd12
commit
31d94edbda
2 changed files with 268 additions and 0 deletions
87
Makefile.standalone
Normal file
87
Makefile.standalone
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Makefile to build x48 without autotools
|
||||
|
||||
CC = gcc
|
||||
|
||||
CFLAGS = -g -O2 -Wall
|
||||
LIBS = -lm -lX11 -lXext -lhistory -lreadline
|
||||
|
||||
all: mkcard checkrom dump2rom x48
|
||||
|
||||
# Binaries
|
||||
mkcard: src/mkcard.c
|
||||
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
||||
|
||||
dump2rom: src/dump2rom.c
|
||||
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
||||
|
||||
checkrom: src/checkrom.c src/romio.o
|
||||
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
||||
|
||||
x48: src/main.o src/actions.o src/debugger.o src/device.o src/disasm.o src/emulate.o src/errors.o src/init.o src/lcd.o src/memory.o src/register.o src/resources.o src/romio.o src/rpl.o src/serial.o src/timer.o src/x48_x11.o src/options.o src/resources.o
|
||||
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
||||
|
||||
# Cleaning
|
||||
clean:
|
||||
rm -f src/*.o
|
||||
|
||||
clean-all: clean
|
||||
rm -f x48 mkcard checkrom dump2rom
|
||||
|
||||
# Formatting
|
||||
pretty-code:
|
||||
clang-format -i src/*.c src/*.h
|
||||
|
||||
# Objects
|
||||
# %.o: %.c %.d
|
||||
# $(CC) $(CFLAGS) -c -o $@ $^
|
||||
|
||||
# src/main.o: src/main.c src/x48_x11.h src/global.h src/config.h src/hp48.h src/mmu.h src/debugger.h src/resources.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/actions.o: src/actions.c src/global.h src/config.h src/hp48.h src/mmu.h src/hp48_emu.h src/device.h src/x48_x11.h src/timer.h src/debugger.h src/romio.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/debugger.o: src/debugger.c src/global.h src/config.h src/hp48.h src/mmu.h src/device.h src/timer.h src/x48_x11.h src/debugger.h src/disasm.h src/rpl.h src/romio.h src/resources.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/device.o: src/device.c src/global.h src/config.h src/hp48.h src/mmu.h src/hp48_emu.h src/device.h src/timer.h src/x48_x11.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/disasm.o: src/disasm.c src/global.h src/config.h src/hp48.h src/mmu.h src/disasm.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/emulate.o: src/emulate.c src/global.h src/config.h src/hp48.h src/mmu.h src/hp48_emu.h src/device.h src/timer.h src/x48_x11.h src/debugger.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/errors.o: src/errors.c src/global.h src/config.h src/resources.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/init.o: src/init.c src/hp48.h src/global.h src/config.h src/mmu.h src/hp48_emu.h src/device.h src/resources.h src/romio.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/lcd.o: src/lcd.c src/global.h src/config.h src/hp48.h src/mmu.h src/hp48_emu.h src/x48_x11.h src/annunc.h src/device.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/memory.o: src/memory.c src/global.h src/config.h src/hp48.h src/mmu.h src/device.h src/hp48_emu.h src/x48_x11.h src/romio.h src/resources.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/register.o: src/register.c src/global.h src/config.h src/hp48.h src/mmu.h src/hp48_emu.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/resources.o: src/resources.c src/global.h src/config.h src/resources.h src/disasm.h src/hp48.h src/mmu.h src/errors.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/romio.o: src/romio.c src/global.h src/config.h src/resources.h src/romio.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/rpl.o: src/rpl.c src/global.h src/config.h src/hp48.h src/mmu.h src/hp48_emu.h src/rpl.h src/debugger.h src/append.h src/disasm.h src/romio.h src/hp48char.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/serial.o: src/serial.c src/global.h src/config.h src/x48_x11.h src/hp48.h src/mmu.h src/device.h src/hp48_emu.h src/resources.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/timer.o: src/timer.c src/global.h src/config.h src/timer.h src/hp48.h src/mmu.h src/debugger.h src/romio.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# src/x48_x11.o: src/x48_x11.c src/global.h src/config.h src/x48_x11.h src/small.h src/buttons.h src/hp.h src/hp48.h src/mmu.h src/device.h src/constants.h src/options.h src/resources.h src/errors.h src/romio.h
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
181
src/config.h
Normal file
181
src/config.h
Normal file
|
@ -0,0 +1,181 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Date program was compiled */
|
||||
#define COMPILE_TIME "Wed Apr 26 16:25:06 CEST 2023"
|
||||
|
||||
/* description */
|
||||
#define COMPILE_VERSION 0
|
||||
|
||||
/* Define to 1 if you have the `bzero' function. */
|
||||
#define HAVE_BZERO 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `GL' library (-lGL). */
|
||||
/* #undef HAVE_LIBGL */
|
||||
|
||||
/* Define to 1 if you have the `history' library (-lhistory). */
|
||||
#define HAVE_LIBHISTORY 1
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#define HAVE_MALLOC 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
#define HAVE_MKDIR 1
|
||||
|
||||
/* Define if Readline is used. */
|
||||
#define HAVE_READLINE 1
|
||||
|
||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||
#define HAVE_READLINE_HISTORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||
#define HAVE_READLINE_READLINE_H 1
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if `stat' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
/* #undef HAVE_STAT_EMPTY_STRING_BUG */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#define HAVE_STRRCHR 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if MIT Shared Memory extension is used. */
|
||||
#define HAVE_XSHM 1
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "x48"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "x48-bugs@gam3.net"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "x48"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "x48 0.6.4"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "x48"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.6.4"
|
||||
|
||||
/* The patch level */
|
||||
#define PATCHLEVEL 4
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#define SELECT_TYPE_ARG234 (fd_set *)
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.6.4"
|
||||
|
||||
/* The major version number */
|
||||
#define VERSION_MAJOR 0
|
||||
|
||||
/* The minor version number */
|
||||
#define VERSION_MINOR 6
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
/* #undef X_DISPLAY_MISSING */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
/* #undef malloc */
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
Loading…
Reference in a new issue