macrompatcher/cli/Makefile.inc
doug 875de91fce Fixed a few things that allow it to compile and run on Windows:
1) htonl() and htons() are declared in winsock.h on Windows and require ws2_32 to be linked in.
2) mingw does not have asprintf, so I changed the Qt GUI to use QString's sprintf() member function which should behave identically.
3) Windows Vista and 7 try to run any program with "patch" in the name with administrative privileges for backwards compatibility with legacy stuff, so I added a build step to the Qt app to embed a manifest. I also need to do the same thing with the cli app...
2011-12-05 03:35:33 +00:00

15 lines
347 B
Makefile

ROMPATCHER_SRCS := main.c
ROMPATCHER_SRCS := $(patsubst %, cli/%, $(ROMPATCHER_SRCS))
ROMPATCHER_EXE := cli/macrompatcher
cli_all: $(ROMPATCHER_EXE)
cli_clean:
rm -f $(ROMPATCHER_SRCS:%.c=%.o)
rm -f $(ROMPATCHER_EXE)
$(ROMPATCHER_EXE): $(ROMPATCHER_SRCS:%.c=%.o) $(ROMLIB_A)
$(CC) $(CFLAGS) -o $@ $< $(ROMLIB_A) $(LDFLAGS)
cli/%o: cli/%.c