From 759bccce52935149972d088987d92a7c32af8081 Mon Sep 17 00:00:00 2001 From: George Sokianos Date: Fri, 23 Feb 2024 22:04:01 +0000 Subject: [PATCH] Some changes in makefiles --- Makefile.mos | 18 +++++++++++------- Makefile.os4 | 8 +++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Makefile.mos b/Makefile.mos index ed7376a1..e2e414a0 100644 --- a/Makefile.mos +++ b/Makefile.mos @@ -11,16 +11,20 @@ LiteXL_OBJ := \ src/api/utf8.o src/platform/morphos.o \ src/api/dirmonitor/mos.o src/platform/codesets.o - outfile := lite-xl compiler := ppc-morphos-gcc-11 cxxcompiler := ppc-morphos-g++-11 -INCPATH := -Isrc -Ilib/dmon -I/sdk/gg/usr/local/include/SDL2 -I/sdk/gg/usr/include/freetype -I/sdk/gg/usr/include/lua5.4 -DFLAGS := -D__USE_INLINE__ -CFLAGS := -Wall -Wwrite-strings -O2 -noixemul -g -std=gnu11 -fno-strict-aliasing -LFLAGS := -noixemul -lpcre2-8 -lSDL2 -llua54 -lagg -lfreetype -lm -lc -L/usr/local/lib +INCPATH := -Isrc -Ilib/dmon -I/sdk/gg/usr/local/include/SDL2 \ + -I/sdk/gg/usr/include/freetype -I/sdk/gg/usr/include/lua5.4 +DFLAGS ?= -D__USE_INLINE__ +CFLAGS ?= -Wall -Wwrite-strings -O2 -noixemul -g -std=gnu11 -fno-strict-aliasing +LFLAGS ?= -noixemul -lpcre2-8 -lSDL2 -llua54 -lagg -lfreetype -lm -lc -L/usr/local/lib +ifeq ($(DEBUG),1) +CFLAGS += -g -gstabs +LFLAGS += -gstabs +endif .PHONY: LiteXL clean release @@ -32,11 +36,11 @@ clean: LiteXL: $(LiteXL_OBJ) @echo "Linking LiteXL" - @$(cxxcompiler) -o $(outfile) $(LiteXL_OBJ) $(LFLAGS) + $(compiler) -o $(outfile) $(LiteXL_OBJ) $(LFLAGS) .c.o: @echo "Compiling $<" - @$(compiler) -c $< -o $*.o $(CFLAGS) $(INCPATH) $(DFLAGS) + $(compiler) -c $< -o $*.o $(CFLAGS) $(INCPATH) $(DFLAGS) src/main.o: src/main.c src/api/api.h src/rencache.h \ src/renderer.h src/platform/morphos.h diff --git a/Makefile.os4 b/Makefile.os4 index c9facd54..7590da39 100644 --- a/Makefile.os4 +++ b/Makefile.os4 @@ -19,11 +19,9 @@ INCPATH := -Isrc -I/sdk/local/newlib/include/SDL2 \ -I/sdk/local/common/include/lua54 -I/sdk/local/common/include/freetype2 DFLAGS += -D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR - -CFLAGS += -Werror -Wwrite-strings -O3 -std=gnu11 -fno-strict-aliasing - -LFLAGS += -mcrt=newlib \ - -lpcre2-8 -lSDL2 -llua54 -lfreetype -lpng -lz -lpthread -athread=native +CFLAGS ?= -Werror -Wwrite-strings -O3 -std=gnu11 -fno-strict-aliasing +LFLAGS ?= -mcrt=newlib -lpcre2-8 -lSDL2 -llua54 -lfreetype -lpng -lz \ + -lpthread -athread=native ifeq ($(DEBUG),1) CFLAGS += -g -gstabs