brainlilo/Makefile

54 lines
1.7 KiB
Makefile
Raw Permalink Normal View History

2024-02-04 10:08:17 +09:00
VERSION_MAJOR=4
VERSION_MINOR=1
2022-04-12 01:38:06 +09:00
VERSION_PATCH=0
PREFIX?=/opt/cegcc
2020-09-28 03:19:37 +09:00
2020-09-29 14:13:29 +09:00
CC=$(PREFIX)/bin/arm-mingw32ce-gcc
CXX=$(PREFIX)/bin/arm-mingw32ce-g++
LD=$(PREFIX)/bin/arm-mingw32ce-g++
STRIP=$(PREFIX)/bin/arm-mingw32ce-strip
DLLTOOL=$(PREFIX)/bin/arm-mingw32ce-dlltool
AS=$(PREFIX)/bin/arm-mingw32ce-as
NM=$(PREFIX)/bin/arm-mingw32ce-nm
WINDRES=$(PREFIX)/bin/arm-mingw32ce-windres
2020-09-28 03:19:37 +09:00
2022-01-23 16:22:34 +09:00
OUTPUT=BrainLILO.dll BrainLILODrv.dll BrainLILO.exe
2020-09-28 03:19:37 +09:00
CXXFLAGS= -DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
-O0 -mcpu=arm926ej-s -D_WIN32_WCE=0x600 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
-D_FILE_OFFSET_BITS=64 -static
DLLFLAGS=-DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
-O0 -mcpu=arm926ej-s -D_WIN32_WCE=0x600 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
-D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -static \
-Wl,--image-base,0x100000 \
-shared
DRVFLAGS= -DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
-O2 -mcpu=arm926ej-s -D_WIN32_WCE=0x600 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
2024-01-26 18:49:00 +09:00
-DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_PATCH=\"$(VERSION_PATCH)\" \
2020-09-28 03:19:37 +09:00
-D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -static \
-Wl,--image-base,0x100000,--allow-multiple-definition \
-lcoredll -shared
2020-09-28 03:19:37 +09:00
.PHONY: all clean
all: $(OUTPUT)
clean:
rm -f $(OUTPUT)
BrainLILO.dll: BrainLILO.cpp
$(CXX) BrainLILO.cpp -o BrainLILO.dll $(DLLFLAGS)
$(STRIP) BrainLILO.dll
BrainLILODrv.dll: BrainLILODrv.cpp EDNA2_physicalInvoker.S
$(CXX) BrainLILODrv.cpp EDNA2_physicalInvoker.S -o BrainLILODrv.dll $(DRVFLAGS)
2020-09-28 03:19:37 +09:00
$(STRIP) BrainLILODrv.dll
BrainLILO.exe: bootloader.cpp
$(CXX) bootloader.cpp -o BrainLILO.exe $(CXXFLAGS)
$(STRIP) BrainLILO.exe