114 lines
2.7 KiB
Makefile
114 lines
2.7 KiB
Makefile
#
|
|
# Project: Lite XL
|
|
# Makefile for AmigaOS 4
|
|
#
|
|
# Created on: 26-12-2021
|
|
#
|
|
|
|
LiteXL_OBJ := \
|
|
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 \
|
|
src/api/dirmonitor/os4.o src/platform/codesets.o
|
|
|
|
BIN := lite-xl
|
|
CC := ppc-amigaos-gcc
|
|
STRIP := ppc-amigaos-strip
|
|
|
|
ifeq ($(UNAME), AmigaOS)
|
|
SDKPATH := /sdk
|
|
DEL := delete ALL QUIET FORCE
|
|
LHA := lha -aeqr3 a LiteXL2_OS4.lha release/
|
|
else
|
|
SDKPATH := $(SDK_PATH)
|
|
DEL := rm -rf
|
|
LHA := cd ./release && lha aq ../LiteXL2_OS4.lha ./* && cd ..
|
|
endif
|
|
|
|
INCPATH := -Isrc -I$(SDKPATH)/local/newlib/include/SDL2 \
|
|
-I$(SDKPATH)/local/common/include/lua54 \
|
|
-I$(SDKPATH)/local/common/include/freetype2
|
|
|
|
DFLAGS += -D__USE_INLINE__
|
|
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
|
|
LFLAGS += -gstabs
|
|
|
|
ifeq ($(PROFYLER),1)
|
|
CFLAGS += -finstrument-functions -fno-inline -DPROFILING
|
|
LFLAGS += -lprofyle
|
|
endif
|
|
endif
|
|
|
|
|
|
.PHONY: LiteXL clean release
|
|
|
|
default: LiteXL
|
|
|
|
clean:
|
|
@echo "Cleaning compiler objects..."
|
|
@rm -f $(LiteXL_OBJ)
|
|
|
|
LiteXL: $(LiteXL_OBJ)
|
|
@echo "Linking LiteXL"
|
|
@$(CC) -o $(BIN) $(LiteXL_OBJ) $(LFLAGS)
|
|
|
|
|
|
.c.o:
|
|
@echo "Compiling $<"
|
|
@$(CC) -c $< -o $*.o $(CFLAGS) $(INCPATH) $(DFLAGS)
|
|
|
|
|
|
src/main.o: src/main.c src/api/api.h src/rencache.h \
|
|
src/renderer.h src/platform/amigaos4.h src/platform/codesets.h
|
|
|
|
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
|
|
|
|
src/api/system.o: src/api/system.c src/platform/amigaos4.h
|
|
|
|
src/platform/amigaos4.o: src/platform/amigaos4.c
|
|
|
|
src/platform/codesets.o: src/platform/codesets.c
|
|
|
|
src/api/dirmonitor.o: src/api/dirmonitor.c src/api/dirmonitor/os4.c
|
|
|
|
src/api/utf8.o: src/api/utf8.c src/platform/amigaos4.h
|
|
|
|
src/api/dirmonitor/os4.o: src/api/dirmonitor/os4.c
|
|
|
|
src/api/process.o: src/api/process.c
|
|
|
|
release: clean LiteXL
|
|
@echo "Creating release files..."
|
|
@mkdir -p release/LiteXL2
|
|
@cp -r resources/amiga/* release/LiteXL2/
|
|
@mv release/LiteXL2/LiteXL2.info release/
|
|
@mv release/LiteXL2/AutoInstall release/
|
|
@cp -r data release/LiteXL2/
|
|
@cp changelog.md release/LiteXL2/
|
|
@cp $(BIN) release/LiteXL2/
|
|
@$(STRIP) release/LiteXL2/$(BIN)
|
|
@cp README.md release/LiteXL2/
|
|
@cp README_Amiga.md release/LiteXL2/
|
|
@cp LICENSE release/LiteXL2/
|
|
@cp -r licenses release/LiteXL2/
|
|
@echo "Creating release archive..."
|
|
@$(LHA)
|
|
@echo "Clean release files..."
|
|
@$(DEL) release
|