From 4f98fb725823b78b10fb19993eb6f809a2a0a644 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 25 Aug 2024 18:37:05 +0200 Subject: [PATCH] cleanup Makefile --- Makefile | 13 ++++--------- src/hw_config.c | 20 ++++++++++---------- src/main.c | 2 +- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index dec6997..3742b65 100644 --- a/Makefile +++ b/Makefile @@ -7,19 +7,16 @@ # https://opensource.org/license/MIT. PREFIX = /usr -DOCDIR = $(PREFIX)/doc/x48ng -MANDIR = $(PREFIX)/man +DOCDIR = $(PREFIX)/doc/saturn OPTIM ?= 2 CFLAGS ?= -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -I./libChf -L./libChf/st_build -lutil LIBS = -lm -lChf -lXm -X11CFLAGS = $(shell pkg-config --cflags x11 xext) -D_GNU_SOURCE=1 +X11CFLAGS = $(shell pkg-config --cflags x11 xext) X11LIBS = $(shell pkg-config --libs x11 xext xt) -CFLAGS += $(X11CFLAGS) -LIBS += $(X11LIBS) FULL_WARNINGS = no DOTOS = src/cpu.o \ @@ -90,12 +87,10 @@ override CFLAGS := -std=c11 \ $(call cc-option,-Wlogical-op) \ $(call cc-option,-Wno-unknown-warning-option) \ $(EXTRA_WARNING_FLAGS) \ + $(X11CFLAGS) \ $(CFLAGS) override CPPFLAGS := -I./src/ -D_GNU_SOURCE=1 \ - -DVERSION_MAJOR=$(VERSION_MAJOR) \ - -DVERSION_MINOR=$(VERSION_MINOR) \ - -DPATCHLEVEL=$(PATCHLEVEL) \ $(CPPFLAGS) .PHONY: all clean clean-all pretty-code install mrproper get-roms install @@ -107,7 +102,7 @@ libChf/st_build/libChf.a: make -C libChf dist/saturn: $(DOTOS) libChf/st_build/libChf.a - $(CC) $^ -o $@ $(CFLAGS) $(LIBS) + $(CC) $^ -o $@ $(CFLAGS) $(LIBS) $(X11LIBS) dist/pack: src/pack.o src/disk_io.o src/debug.o libChf/st_build/libChf.a $(CC) $^ -o $@ $(CFLAGS) $(LIBS) diff --git a/src/hw_config.c b/src/hw_config.c index 89333e4..b08c9c8 100644 --- a/src/hw_config.c +++ b/src/hw_config.c @@ -166,11 +166,11 @@ table[] = {"hp48", { /* name, id, access_prio, - init, save, - read, write, - r_config, r_abs_base_addr, r_size, - map_flags - */ + init, save, + read, write, + r_config, r_abs_base_addr, r_size, + map_flags + */ { "ROM (ROM)", @@ -257,11 +257,11 @@ table[] = {"hp49", { /* name, id, access_prio, - init, save, - read, write, - r_config, r_abs_base_addr, r_size, - map_flags - */ + init, save, + read, write, + r_config, r_abs_base_addr, r_size, + map_flags + */ { "ROM (ROM)", diff --git a/src/main.c b/src/main.c index aa577dc..f385309 100644 --- a/src/main.c +++ b/src/main.c @@ -102,7 +102,7 @@ static char rcs_id[] = "$Id: saturn.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"; #include #include -#include +// #include #include /* 3.1: strcpy(), strcat() */ #include /* isatty() */