|
From: falcovorbis <fal...@us...> - 2024-09-23 01:39:36
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "A pseudo Operating System for the Dreamcast.".
The branch, master has been updated
via fe20ac49efbf6424aa6375e6dbd9c294b5f35bb4 (commit)
from 497bfca329e78bc8d8259e62a3e88415b8cc8390 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fe20ac49efbf6424aa6375e6dbd9c294b5f35bb4
Author: Paul Cercueil <pa...@cr...>
Date: Mon Sep 23 03:38:04 2024 +0200
utils/pvrtex: fix and improve Makefile (#749)
We must not add KOS specific include paths when compiling a *host*
utility. This can cause the compilation to fail (as it did on my
system).
A lot of the rules are unnecesary, the default rules can be used as long
as the proper variable names are used.
The "all" rule is moved as the first rule, so that running "make" will
be equivalent to running "make all".
Signed-off-by: Paul Cercueil <pa...@cr...>
-----------------------------------------------------------------------
Summary of changes:
utils/pvrtex/Makefile | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/utils/pvrtex/Makefile b/utils/pvrtex/Makefile
index 1acf1204..a581f382 100644
--- a/utils/pvrtex/Makefile
+++ b/utils/pvrtex/Makefile
@@ -7,16 +7,16 @@ OBJS = elbg.o mem.o log.o bprint.o avstring.o lfg.o crc.o md5.o stb_image_impl.o
dither.o tddither.o vqcompress.o mycommon.o file_common.o \
file_pvr.o file_tex.o file_dctex.o pvr_texture_encoder.o main.o
+CPPFLAGS = -Ilibavutil -I. -DCONFIG_MEMORY_POISONING=0 -DHAVE_FAST_UNALIGNED=0
+CXXFLAGS = -flto=auto -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare
+
ifdef $(DEBUGBUILD)
- OPTMODE= -Og -pg -g
+ CXXFLAGS += -Og -pg -g
else
- OPTMODE= -O3 -flto
+ CXXFLAGS += -O3 -flto
endif
-MYFLAGS=-flto=auto -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Ilibavutil -I. -DCONFIG_MEMORY_POISONING=0 -DHAVE_FAST_UNALIGNED=0 -I${KOS_INC_PATHS}
-MYCPPFLAGS=$(MYFLAGS)
-MYCFLAGS=$(MYFLAGS) -Wno-pointer-sign
-
+CFLAGS := $(CXXFLAGS) -Wno-pointer-sign
define textSegment2Header
mkdir -p info
@@ -27,18 +27,12 @@ endef
.PHONY: all clean
+all: $(TARGET) README
+
$(TARGET): $(OBJS)
- gcc $(OPTMODE) -o $(TARGET) \
- $(OBJS) $(PROGMAIN) -lm -lstdc++
+ $(CXX) $(CXXFLAGS) -o $@ $^
main.o: main.c info/options.h info/examples.h
- gcc $(CFLAGS) $(MYCFLAGS) $(OPTMODE) -c $< -o $@
-
-%.o: %.c
- gcc $(CFLAGS) $(MYCFLAGS) $(OPTMODE) -c $< -o $@
-
-%.o: %.cpp
- gcc $(CFLAGS) $(MYCPPFLAGS) $(CXXFLAGS) $(OPTMODE) -c $< -o $@
clean:
rm -f $(TARGET) $(OBJS) README
@@ -46,8 +40,6 @@ clean:
README: readme_unformatted.txt
fmt -s readme_unformatted.txt > README
-all: $(TARGET) README
-
install: all
install -m 755 $(TARGET) $(DC_TOOLS_BASE)/
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|