2022-01-12 00:29:57 +01:00
|
|
|
#
|
|
|
|
# Project: Lite XL
|
|
|
|
#
|
2023-01-09 01:45:37 +01:00
|
|
|
# Created on: 26-12-2021
|
2022-01-12 00:29:57 +01:00
|
|
|
#
|
|
|
|
|
2022-02-05 14:25:29 +01:00
|
|
|
LiteXL_OBJ := \
|
2022-10-10 20:06:19 +02:00
|
|
|
src/main.o src/rencache.o src/renderer.o src/renwindow.o \
|
|
|
|
src/api/api.o src/api/dirmonitor.o \
|
|
|
|
src/api/regex.o src/api/renderer.o src/api/system.o \
|
|
|
|
src/api/utf8.o src/platform/amigaos4.o \
|
2023-12-18 18:19:13 +01:00
|
|
|
src/api/dirmonitor/os4.o src/platform/codesets.o
|
2022-02-05 14:25:29 +01:00
|
|
|
|
2023-01-29 13:58:56 +01:00
|
|
|
outfile := lite-xl
|
2024-02-11 23:11:30 +01:00
|
|
|
compiler := gcc
|
|
|
|
cxxcompiler := g++
|
2022-02-05 14:25:29 +01:00
|
|
|
|
2023-01-09 01:45:37 +01:00
|
|
|
INCPATH := -Isrc -I/sdk/local/newlib/include/SDL2 \
|
2022-10-10 20:06:19 +02:00
|
|
|
-I/sdk/local/common/include/lua54 -I/sdk/local/common/include/freetype2
|
2022-09-26 15:28:59 +02:00
|
|
|
|
2023-01-09 01:45:37 +01:00
|
|
|
DFLAGS += -D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR
|
|
|
|
|
|
|
|
CFLAGS += -Werror -Wwrite-strings -O3 -std=gnu11 -fno-strict-aliasing
|
2022-09-26 15:28:59 +02:00
|
|
|
|
2023-12-18 18:19:13 +01:00
|
|
|
LFLAGS += -mcrt=newlib \
|
2024-02-11 23:11:30 +01:00
|
|
|
-lpcre2-8 -lSDL2 -llua54 -lfreetype -lpng -lz -lpthread -athread=native
|
2022-02-05 14:25:29 +01:00
|
|
|
|
2022-09-26 16:30:42 +02:00
|
|
|
ifeq ($(DEBUG),1)
|
2023-01-09 01:45:37 +01:00
|
|
|
CFLAGS += -g -gstabs
|
2022-09-26 16:30:42 +02:00
|
|
|
LFLAGS += -gstabs
|
|
|
|
|
|
|
|
ifeq ($(PROFYLER),1)
|
|
|
|
CFLAGS += -finstrument-functions -fno-inline -DPROFILING
|
|
|
|
LFLAGS += -lprofyle
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
2022-02-05 14:25:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: LiteXL clean release
|
|
|
|
|
|
|
|
default: LiteXL
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo "Cleaning compiler objects..."
|
|
|
|
@rm -f $(LiteXL_OBJ)
|
|
|
|
|
|
|
|
LiteXL: $(LiteXL_OBJ)
|
|
|
|
@echo "Linking LiteXL"
|
2023-01-09 01:45:37 +01:00
|
|
|
@$(compiler) -o $(outfile) $(LiteXL_OBJ) $(LFLAGS)
|
2022-02-05 14:25:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo "Compiling $<"
|
2022-10-10 20:06:19 +02:00
|
|
|
@$(compiler) -c $< -o $*.o $(CFLAGS) $(INCPATH) $(DFLAGS)
|
2022-02-05 14:25:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
src/main.o: src/main.c src/api/api.h src/rencache.h \
|
2023-12-18 18:19:13 +01:00
|
|
|
src/renderer.h src/platform/amigaos4.h src/platform/codesets.h
|
2022-02-05 14:25:29 +01:00
|
|
|
|
|
|
|
src/rencache.o: src/rencache.c
|
|
|
|
|
|
|
|
src/renderer.o: src/renderer.c
|
|
|
|
|
|
|
|
src/renwindow.o: src/renwindow.c
|
|
|
|
|
|
|
|
src/api/api.o: src/api/api.c
|
|
|
|
|
|
|
|
src/api/regex.o: src/api/regex.c
|
|
|
|
|
|
|
|
src/api/renderer.o: src/api/renderer.c
|
|
|
|
|
2023-12-18 18:19:13 +01:00
|
|
|
src/api/system.o: src/api/system.c src/platform/amigaos4.h
|
2022-02-05 14:25:29 +01:00
|
|
|
|
|
|
|
src/platform/amigaos4.o: src/platform/amigaos4.c
|
|
|
|
|
2023-12-18 18:19:13 +01:00
|
|
|
src/platform/codesets.o: src/platform/codesets.c
|
|
|
|
|
2022-10-10 20:06:19 +02:00
|
|
|
src/api/dirmonitor.o: src/api/dirmonitor.c src/api/dirmonitor/os4.c
|
2022-02-05 14:25:29 +01:00
|
|
|
|
2023-12-18 18:19:13 +01:00
|
|
|
src/api/utf8.o: src/api/utf8.c src/platform/amigaos4.h
|
2022-01-12 00:29:57 +01:00
|
|
|
|
2022-10-10 20:06:19 +02:00
|
|
|
src/api/dirmonitor/os4.o: src/api/dirmonitor/os4.c
|
2022-01-12 00:29:57 +01:00
|
|
|
|
2023-01-29 13:58:56 +01:00
|
|
|
src/api/process.o: src/api/process.c
|
|
|
|
|
|
|
|
release: clean LiteXL
|
2022-06-18 19:17:07 +02:00
|
|
|
@echo "Creating release files..."
|
|
|
|
@mkdir -p release/LiteXL2
|
2023-12-26 11:58:41 +01:00
|
|
|
@cp -r resources/amiga/* release/LiteXL2/
|
2022-06-18 19:17:07 +02:00
|
|
|
@mv release/LiteXL2/LiteXL2.info release/
|
2022-09-26 16:44:38 +02:00
|
|
|
@cp -r data release/LiteXL2/
|
2022-06-18 19:17:07 +02:00
|
|
|
@cp changelog.md release/LiteXL2/
|
2023-01-29 13:58:56 +01:00
|
|
|
@cp $(outfile) release/LiteXL2/
|
|
|
|
@strip release/LiteXL2/$(outfile)
|
2022-06-18 19:17:07 +02:00
|
|
|
@cp README.md release/LiteXL2/
|
|
|
|
@cp README_Amiga.md release/LiteXL2/
|
|
|
|
@cp LICENSE release/LiteXL2/
|
2023-12-26 12:40:44 +01:00
|
|
|
@cp -r licenses release/LiteXL2/
|
2022-06-18 19:17:07 +02:00
|
|
|
@echo "Creating release archive..."
|
|
|
|
@lha -aeqr3 a LiteXL2_OS4.lha release/
|
|
|
|
@echo "Clean release files..."
|
|
|
|
@delete release ALL QUIET FORCE
|