[Nrage-input] Create Makefile, delete Script/MinGW/nrage.cmd
- Created a Makefile to work under MSYS2; requires the w32api package installed through MSYS2's pacman. The old script isn't needed anymore. Thanks to DKO for the patch.
This commit is contained in:
parent
2b15003e77
commit
d5caf89dfc
|
@ -1,71 +0,0 @@
|
|||
@ECHO OFF
|
||||
TITLE MinGW Compiler Suite Invocation
|
||||
|
||||
set src=%CD%\..\..\nragev20
|
||||
set obj=%CD%\N-Rage
|
||||
|
||||
if not exist %obj% (
|
||||
mkdir %obj%
|
||||
)
|
||||
|
||||
set MinGW=C:\MinGW
|
||||
REM set MinGW=C:\msys64\mingw64\x86_64-w64-mingw32\..
|
||||
|
||||
set FLAGS_x86=^
|
||||
-I%src%\..\3rdParty\directx\include^
|
||||
-Wno-write-strings^
|
||||
-S^
|
||||
-masm=intel^
|
||||
-march=native^
|
||||
-Os
|
||||
|
||||
set C_FLAGS=%FLAGS_x86%
|
||||
|
||||
cd %MinGW%\bin
|
||||
set CC=%MinGW%\bin\g++.exe
|
||||
set AS=%MinGW%\bin\as.exe
|
||||
|
||||
ECHO Compiling N-Rage plugin sources...
|
||||
%CC% -o %obj%\NRagePluginV2.asm %src%\NRagePluginV2.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\Interface.asm %src%\Interface.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\FileAccess.asm %src%\FileAccess.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\PakIO.asm %src%\PakIO.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\GBCart.asm %src%\GBCart.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\International.asm %src%\International.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\DirectInput.asm %src%\DirectInput.cpp %C_FLAGS%
|
||||
%CC% -o %obj%\XInputController.asm %src%\XInputController.cpp %C_FLAGS%
|
||||
|
||||
ECHO Assembling N-Rage sources...
|
||||
%AS% -o %obj%\NRagePluginV2.o %obj%\NRagePluginV2.asm
|
||||
%AS% -o %obj%\Interface.o %obj%\Interface.asm
|
||||
%AS% -o %obj%\FileAccess.o %obj%\FileAccess.asm
|
||||
%AS% -o %obj%\PakIO.o %obj%\PakIO.asm
|
||||
%AS% -o %obj%\GBCart.o %obj%\GBCart.asm
|
||||
%AS% -o %obj%\International.o %obj%\International.asm
|
||||
%AS% -o %obj%\DirectInput.o %obj%\DirectInput.asm
|
||||
%AS% -o %obj%\XInputController.o %obj%\XInputController.asm
|
||||
ECHO.
|
||||
|
||||
set OBJ_LIST=^
|
||||
%obj%\XInputController.o^
|
||||
%obj%\DirectInput.o^
|
||||
%obj%\International.o^
|
||||
%obj%\GBCart.o^
|
||||
%obj%\PakIO.o^
|
||||
%obj%\FileAccess.o^
|
||||
%obj%\Interface.o^
|
||||
%obj%\NRagePluginV2.o^
|
||||
-ldinput8^
|
||||
-loleaut32^
|
||||
-lole32^
|
||||
-luuid^
|
||||
-lcomctl32^
|
||||
-mwindows^
|
||||
-lcomdlg32^
|
||||
-lgdi32^
|
||||
%obj%\NRagePluginV2.res
|
||||
|
||||
ECHO Linking N-Rage objects...
|
||||
%MinGW%\bin\windres.exe -o %obj%\NRagePluginV2.res -i %src%\NRagePluginV2.rc -O coff
|
||||
%MinGW%\bin\g++.exe -o %obj%\PJ64_NRage.dll %OBJ_LIST% -shared -shared-libgcc
|
||||
PAUSE
|
|
@ -0,0 +1,66 @@
|
|||
CXX := g++
|
||||
LD := g++
|
||||
WINDRES := windres
|
||||
|
||||
OBJECTS := \
|
||||
Debug.o \
|
||||
DirectInput.o \
|
||||
FileAccess.o \
|
||||
GBCart.o \
|
||||
Interface.o \
|
||||
International.o \
|
||||
NRagePluginV2.o \
|
||||
PakIO.o \
|
||||
XInputController.o
|
||||
|
||||
RESOURCE := NRagePluginV2.res
|
||||
|
||||
TARGET := PJ64_NRage.dll
|
||||
|
||||
CPPFLAGS := \
|
||||
-DNOMINMAX
|
||||
|
||||
CXXFLAGS := \
|
||||
-shared \
|
||||
-fPIC \
|
||||
-Os \
|
||||
-Wno-write-strings
|
||||
|
||||
LIBS := \
|
||||
-lcomctl32 \
|
||||
-lcomdlg32 \
|
||||
-ldinput8 \
|
||||
-lgdi32 \
|
||||
-lole32 \
|
||||
-loleaut32 \
|
||||
-luuid \
|
||||
-static -lwinpthread
|
||||
|
||||
LDFLAGS := \
|
||||
-mwindows \
|
||||
-static-libgcc \
|
||||
-static-libstdc++
|
||||
|
||||
DEPFILES := $(addprefix .deps/,$(OBJECTS:.o=.d))
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: .deps $(TARGET)
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJECTS) $(RESOURCE) $(DEPFILES)
|
||||
rm -rf .deps
|
||||
|
||||
.deps:
|
||||
mkdir -p $@
|
||||
|
||||
%.res: %.rc
|
||||
$(WINDRES) -O coff -o $@ -i $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF .deps/$(@:.o=.d) -o $@ -c $<
|
||||
|
||||
$(TARGET): $(OBJECTS) $(RESOURCE)
|
||||
$(LD) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
|
Loading…
Reference in New Issue