corrections to .gitattributes and Makefile

This commit is contained in:
Alexander Frick
2025-12-05 19:54:22 -06:00
parent a5fc84b959
commit 36fe56e5ad
2 changed files with 16 additions and 7 deletions
+2 -1
View File
@@ -6,10 +6,11 @@
*.cpp text eol=lf *.cpp text eol=lf
*.hpp text *.hpp text
# GN/Ninja Files # Build system Files
*.py text *.py text
*.gn text *.gn text
*.gni text *.gni text
*.mak text eol=lf
# Keep scripts correct # Keep scripts correct
*.sh text eol=lf *.sh text eol=lf
+14 -6
View File
@@ -1,4 +1,4 @@
# xp_activate32 MAKEFILE for compiling under MSYS2 MinGW32 # xp_activate32 MAKEFILE for compiling under MinGW32
# Compiler and tools # Compiler and tools
CC := i686-w64-mingw32-gcc CC := i686-w64-mingw32-gcc
@@ -26,7 +26,7 @@ SRC_RC := $(wildcard $(SRC_DIR)/*.rc)
# Objects # Objects
OBJ_C := $(SRC_C:.c=.o) OBJ_C := $(SRC_C:.c=.o)
OBJ_CPP := $(SRC_CPP:.cc=.o) OBJ_CPP := $(SRC_CPP:.cc=.o)
OBJ_RC := $(SRC_RC:.rc=.o) OBJ_RC := $(SRC_RC:.rc=.res)
# Compiler flags # # Compiler flags #
DEFINES := -DUNICODE -D_UNICODE -D_WINDOWS -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -D_WIN64_WINNT=0x0502 -D_WIN32_IE=0x0600 -DPSAPI_VERSION=1 DEFINES := -DUNICODE -D_UNICODE -D_WINDOWS -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -D_WIN64_WINNT=0x0502 -D_WIN32_IE=0x0600 -DPSAPI_VERSION=1
@@ -57,6 +57,10 @@ LDFLAGS := $(LIBS) -static -municode -Wl,--subsystem,windows
# Build Commands # # Build Commands #
all: $(TARGET) all: $(TARGET)
# The only target for now is xp_activate32.exe
$(NAME): $(TARGET)
# xp_activate32.exe itself
$(TARGET): $(OBJ_C) $(OBJ_CPP) $(OBJ_RC) $(TARGET): $(OBJ_C) $(OBJ_CPP) $(OBJ_RC)
$(LD) $(OBJ_C) $(OBJ_CPP) $(OBJ_RC) -o $(TARGET) $(LDFLAGS) $(LD) $(OBJ_C) $(OBJ_CPP) $(OBJ_RC) -o $(TARGET) $(LDFLAGS)
@@ -70,12 +74,16 @@ $(TARGET): $(OBJ_C) $(OBJ_CPP) $(OBJ_RC)
$(CXX) $(CXXFLAGS) -c $< -o $@ $(CXX) $(CXXFLAGS) -c $< -o $@
# Compile .rc → .o or .res # Compile .rc → .o or .res
%.o: %.rc %.res: %.rc
$(RC) $< -o $@ $(RC) $< -O coff $@
# Cleaning Rules # # Cleaning Rules #
clean: clean:
rm -f -v $(OBJ_C) $(OBJ_CPP) $(OBJ_RC) $(OBJ_C:.o=.d) $(OBJ_CPP:.o=.d) $(TARGET) rm -f -v $(OBJ_C) $(OBJ_CPP) $(OBJ_RC) $(OBJ_C:.o=.d) $(OBJ_CPP:.o=.d) $(TARGET)
# PHONY targets # Testing rules #
.PHONY: all clean test:
cat $(TARGET)
# PHONY targets for build deps tracking
.PHONY: all $(NAME) clean test