Skip to content

Commit

Permalink
Genromfs builds on Mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
7dog123 committed Jan 4, 2025
1 parent 205a667 commit 7f01fe3
Show file tree
Hide file tree
Showing 3 changed files with 475 additions and 204 deletions.
5 changes: 2 additions & 3 deletions romfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ EE_OBJS += romfs.o romfs_io.o
EE_OBJS := $(EE_OBJS:%=$(EE_OBJS_DIR)%)

all: $(EE_OBJS_DIR) $(EE_LIB_DIR) $(EE_LIB)

tools: tools/genromfs
$(MAKE) -C tools/genromfs all
cp -f tools/genromfs/genromfs $(DESTDIR)$(PS2SDK)/bin/


$(EE_OBJS_DIR):
mkdir -p $(EE_OBJS_DIR)
Expand All @@ -32,6 +30,7 @@ install: all
mkdir -p $(DESTDIR)$(PS2SDK)/ports/lib
cp -f $(EE_LIB) $(DESTDIR)$(PS2SDK)/ports/lib
cp -f include/*.h $(DESTDIR)$(PS2SDK)/ports/include/
cp -f tools/genromfs/genromfs $(DESTDIR)$(PS2SDK)/bin/

clean:
rm -f -r $(EE_OBJS_DIR) $(EE_LIB_DIR)
Expand Down
8 changes: 7 additions & 1 deletion romfs/tools/genromfs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

# Makefile for the genromfs program.

# Modified to build on MINGW
ifeq ($(OS), Windows_NT)
LDLIBS = -lshlwapi -lws2_32
endif


all: genromfs

PACKAGE = genromfs
Expand All @@ -21,7 +27,7 @@ bindir = $(prefix)/bin
mandir = $(prefix)/man

genromfs: genromfs.o
$(CC) $(LDFLAGS) genromfs.o -o genromfs
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)

.c.o:
$(CC) $(CFLAGS) $< -c -o $@
Expand Down
Loading

0 comments on commit 7f01fe3

Please sign in to comment.