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