2010-05-29 17:01:11 +02:00
|
|
|
include config.mk
|
2010-05-28 14:04:50 +02:00
|
|
|
|
2010-05-26 21:27:37 +02:00
|
|
|
TARGET = ssnes
|
|
|
|
|
2010-11-12 23:09:43 +01:00
|
|
|
DEFINES =
|
2010-12-24 01:26:36 +01:00
|
|
|
OBJ = ssnes.o file.o driver.o
|
2010-12-01 22:46:23 +01:00
|
|
|
libsnes = -lsnes
|
2010-11-19 21:26:31 +01:00
|
|
|
|
|
|
|
LIBS = -lsamplerate $(libsnes)
|
2010-05-28 14:04:50 +02:00
|
|
|
|
|
|
|
ifeq ($(BUILD_RSOUND), 1)
|
2010-12-24 02:18:39 +01:00
|
|
|
OBJ += audio/rsound.o
|
2010-05-28 14:04:50 +02:00
|
|
|
LIBS += -lrsound
|
|
|
|
endif
|
2010-05-28 14:33:18 +02:00
|
|
|
ifeq ($(BUILD_OSS), 1)
|
2010-12-24 02:18:39 +01:00
|
|
|
OBJ += audio/oss.o
|
2010-05-28 14:33:18 +02:00
|
|
|
endif
|
2010-05-28 15:41:38 +02:00
|
|
|
ifeq ($(BUILD_ALSA), 1)
|
2010-12-24 02:18:39 +01:00
|
|
|
OBJ += audio/alsa.o
|
2010-05-28 15:41:38 +02:00
|
|
|
LIBS += -lasound
|
|
|
|
endif
|
2010-08-16 21:20:07 +02:00
|
|
|
ifeq ($(BUILD_ROAR), 1)
|
2010-12-24 02:18:39 +01:00
|
|
|
OBJ += audio/roar.o
|
2010-08-16 21:20:07 +02:00
|
|
|
LIBS += -lroar
|
|
|
|
endif
|
2010-08-25 22:40:43 +02:00
|
|
|
ifeq ($(BUILD_AL), 1)
|
2010-12-24 02:18:39 +01:00
|
|
|
OBJ += audio/openal.o
|
2010-08-25 22:40:43 +02:00
|
|
|
LIBS += -lopenal
|
|
|
|
endif
|
2010-05-28 14:04:50 +02:00
|
|
|
|
|
|
|
ifeq ($(BUILD_OPENGL), 1)
|
2010-12-24 02:18:39 +01:00
|
|
|
OBJ += gfx/gl.o
|
2010-11-12 23:09:43 +01:00
|
|
|
LIBS += -lglfw
|
2010-05-28 14:04:50 +02:00
|
|
|
endif
|
2010-11-12 23:09:43 +01:00
|
|
|
|
|
|
|
ifeq ($(BUILD_CG), 1)
|
|
|
|
LIBS += -lCg -lCgGL
|
|
|
|
DEFINES += -DHAVE_CG
|
|
|
|
endif
|
|
|
|
|
2010-05-29 16:59:57 +02:00
|
|
|
ifeq ($(BUILD_FILTER), 1)
|
2010-06-27 15:46:23 +02:00
|
|
|
OBJ += hqflt/hq.o
|
2010-08-19 15:26:58 +02:00
|
|
|
OBJ += hqflt/grayscale.o
|
2010-08-19 23:44:12 +02:00
|
|
|
OBJ += hqflt/bleed.o
|
2010-08-28 16:36:15 +02:00
|
|
|
OBJ += hqflt/ntsc.o
|
|
|
|
OBJ += hqflt/snes_ntsc/snes_ntsc.o
|
2010-05-29 16:59:57 +02:00
|
|
|
endif
|
2010-05-28 14:04:50 +02:00
|
|
|
|
2010-12-11 19:03:35 +01:00
|
|
|
CFLAGS = -Wall -O3 -std=gnu99 -Wno-unused-variable -I. $(DEFINES)
|
2010-05-26 21:27:37 +02:00
|
|
|
|
2010-06-27 15:46:23 +02:00
|
|
|
all: $(TARGET)
|
2010-05-28 14:04:50 +02:00
|
|
|
|
2010-06-27 15:46:23 +02:00
|
|
|
ssnes: $(OBJ)
|
2010-11-19 21:26:31 +01:00
|
|
|
$(CXX) -o $@ $(OBJ) $(LIBS) $(CFLAGS)
|
2010-06-27 15:46:23 +02:00
|
|
|
|
|
|
|
%.o: %.c config.h config.mk
|
2010-11-19 21:26:31 +01:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
2010-05-28 14:04:50 +02:00
|
|
|
|
|
|
|
install: $(TARGET)
|
|
|
|
install -m755 $(TARGET) $(PREFIX)/bin
|
|
|
|
|
|
|
|
uninstall: $(TARGET)
|
|
|
|
rm -rf $(PREFIX)/bin/$(TARGET)
|
2010-05-26 21:27:37 +02:00
|
|
|
|
|
|
|
clean:
|
2010-08-19 20:29:32 +02:00
|
|
|
rm -f *.o
|
|
|
|
rm -f hqflt/*.o
|
2010-08-28 16:36:15 +02:00
|
|
|
rm -f hqflt/snes_ntsc/*.o
|
2010-08-19 20:29:32 +02:00
|
|
|
rm -f $(TARGET)
|
2010-06-27 15:46:23 +02:00
|
|
|
|
|
|
|
.PHONY: all install uninstall clean
|