Added the Windows manifest generation to the cli app as well.

This commit is contained in:
doug 2011-12-05 05:01:00 +00:00
parent 2017a65139
commit e9aea7e095
2 changed files with 14 additions and 2 deletions

View File

@ -2,4 +2,15 @@
# Use make -f Makefile.win to use this Makefile, which adds
# the required library to the LDFLAGS.
LDFLAGS += -lws2_32
# Because Windows does weird stuff with apps that have
# "patch" in their name, we have to embed a manifest
# file into any apps or they will want administrator
# privileges in order to run.
EXTRA_LINK_OBJECTS += cli/macrompatcher.res
# Here's the rule to create the .res file...
%.res: %.rc
windres --input $< --output $@ --output-format=coff
include Makefile

View File

@ -6,9 +6,10 @@ ROMPATCHER_EXE := cli/macrompatcher
cli_all: $(ROMPATCHER_EXE)
cli_clean:
rm -f $(ROMPATCHER_SRCS:%.c=%.o)
rm -f $(EXTRA_LINK_OBJECTS)
rm -f $(ROMPATCHER_EXE)
$(ROMPATCHER_EXE): $(ROMPATCHER_SRCS:%.c=%.o) $(ROMLIB_A)
$(CC) $(CFLAGS) -o $@ $< $(ROMLIB_A) $(LDFLAGS)
$(ROMPATCHER_EXE): $(ROMPATCHER_SRCS:%.c=%.o) $(ROMLIB_A) $(EXTRA_LINK_OBJECTS)
$(CC) $(CFLAGS) -o $@ $< $(ROMLIB_A) $(EXTRA_LINK_OBJECTS) $(LDFLAGS)
cli/%o: cli/%.c