diff --git a/Makefile.win32 b/Makefile.win32 index 1944110975..b631ebf4d0 100644 --- a/Makefile.win32 +++ b/Makefile.win32 @@ -1,5 +1,6 @@ TARGET = ssnes.exe OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o +JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o CC = gcc CXX = g++ @@ -47,8 +48,10 @@ $(TARGET): $(OBJ) %.o: %.c $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< -ssnes-joyconfig.exe: conf/config_file.o tools/ssnes-joyconfig.o tools/main-stub.o - $(CC) -o ssnes-joyconfig.exe conf/config_file.o tools/ssnes-joyconfig.o $(SDL_LIBS) -L. -static-libgcc tools/main-stub.o + + +ssnes-joyconfig.exe: $(JOBJ) + $(CC) -o ssnes-joyconfig.exe $(JOBJ) $(SDL_LIBS) $(LDFLAGS) clean: rm -f *.o diff --git a/tools/ssnes-joyconfig.c b/tools/ssnes-joyconfig.c index e1928dc68c..f47919c5fe 100644 --- a/tools/ssnes-joyconfig.c +++ b/tools/ssnes-joyconfig.c @@ -250,18 +250,14 @@ static void parse_input(int argc, char *argv[]) } -// Windows is being bitchy. +// Windows is being bitchy. Cannot include SDL.h with a file that has main() it seems ... It simply won't run at all even with -lSDLmain. #ifdef _WIN32 int real_main(int argc, char *argv[]) #else int main(int argc, char *argv[]) #endif { - fprintf(stderr, "hai\n"); - fflush(stderr); parse_input(argc, argv); - fprintf(stderr, "hai\n"); - fflush(stderr); config_file_t *conf = config_file_new(g_in_path); get_binds(conf, g_player - 1, g_joypad - 1);