RetroArch/Makefile.win32

77 lines
1.5 KiB
Makefile
Raw Normal View History

2011-01-07 17:59:53 +01:00
TARGET = ssnes.exe
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o
2011-01-09 19:50:23 +01:00
JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o
2011-01-07 17:59:53 +01:00
CC = gcc
CXX = g++
HAVE_SRC = 1
HAVE_SDL = 1
HAVE_XML = 1
libsnes ?= -lsnes
2011-01-07 17:59:53 +01:00
LIBS =
DEFINES = -I.
2011-01-08 19:44:15 +01:00
LDFLAGS = -L. -static-libgcc -s
2011-01-07 17:59:53 +01:00
SRC_LIBS = -lsamplerate-0
2011-01-09 19:37:55 +01:00
SDL_LIBS = -lSDL
SDL_CFLAGS = -ISDL
2011-01-07 17:59:53 +01:00
ifeq ($(HAVE_SRC), 1)
LIBS += $(SRC_LIBS)
DEFINES += $(SRC_CFLAGS) -DHAVE_SRC
2011-01-07 17:59:53 +01:00
endif
ifeq ($(HAVE_SDL), 1)
OBJ += gfx/gl.o input/sdl.o audio/sdl.o audio/buffer.o
LIBS += $(SDL_LIBS) -lopengl32
DEFINES += $(SDL_CFLAGS) -DHAVE_SDL
endif
ifeq ($(HAVE_XML), 1)
OBJ += gfx/shader_glsl.o
DEFINES += $(XML_CFLAGS) -DHAVE_XML
LIBS += -lxml2
2011-01-07 17:59:53 +01:00
endif
2011-01-10 17:20:08 +01:00
ifneq ($(V),1)
2011-01-10 17:15:27 +01:00
Q := @
endif
2011-01-07 17:59:53 +01:00
LIBS += $(libsnes)
2011-01-08 19:44:15 +01:00
CFLAGS = -Wall -O3 -std=gnu99 -I.
2011-01-07 17:59:53 +01:00
2011-01-09 16:08:06 +01:00
all: $(TARGET) ssnes-joyconfig.exe
2011-01-07 17:59:53 +01:00
$(TARGET): $(OBJ)
2011-01-10 17:15:27 +01:00
$(Q)$(CXX) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)
@$(if $(Q), $(shell echo echo LD $@),)
2011-01-09 16:08:06 +01:00
2011-01-07 17:59:53 +01:00
%.o: %.c
2011-01-10 17:15:27 +01:00
$(Q)$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
@$(if $(Q), $(shell echo echo CC $<),)
2011-01-09 19:50:23 +01:00
ssnes-joyconfig.exe: $(JOBJ)
2011-01-10 17:15:27 +01:00
$(Q)$(CC) -o ssnes-joyconfig.exe $(JOBJ) $(SDL_LIBS) $(LDFLAGS)
@$(if $(Q), $(shell echo echo LD $@),)
2011-01-09 17:24:13 +01:00
2011-01-07 17:59:53 +01:00
clean:
rm -f *.o
rm -f audio/*.o
rm -f conf/*.o
rm -f gfx/*.o
rm -f record/*.o
rm -f hqflt/*.o
2011-01-10 17:20:08 +01:00
rm -f input/*.o
2011-01-07 17:59:53 +01:00
rm -f hqflt/snes_ntsc/*.o
rm -f $(TARGET)
2011-01-09 16:08:06 +01:00
rm -f ssnes-joyconfig.exe
2011-01-09 17:24:13 +01:00
rm -f tools/*.o
2011-01-07 17:59:53 +01:00
2011-01-08 20:05:41 +01:00
dist: all
2011-01-09 16:08:06 +01:00
zip -r ssnes-win32.zip $(TARGET) ssnes.cfg snes.dll libxml2.dll iconv.dll zlib1.dll SDL.dll libsamplerate-0.dll ssnes-joyconfig.exe
2011-01-08 20:05:41 +01:00
.PHONY: all install uninstall clean dist