ifneq ("$(shell grep GTK2 config.h)","\#define GTK2_SUPPORT 1") GTK_FLAGS = `${GTK_CONFIG} --cflags` GTK_LIBS = `${GTK_CONFIG} --libs` else GTK_FLAGS = `pkg-config gtk+-2.0 --cflags` -D_GTK2 GTK_LIBS = `pkg-config gtk+-2.0 --libs` endif CC ?= gcc CXX ?= g++ CFLAGS = -DUSE_GTK `${SDL_CONFIG} --cflags` $(GTK_FLAGS) -Iwrapper/ -ffast-math -funroll-loops -fomit-frame-pointer CPPFLAGS = $(CFLAGS) LD = ${CXX} LDFLAGS = -lGL -lGLU `${SDL_CONFIG} --libs` OBJECTS = Main.o \ rdp.o \ Ini.o \ wrapper/textures.o \ wrapper/main.o \ messagebox.o \ wrapper/geometry.o \ TexCache.o \ Debugger.o \ Util.o \ CRC.o \ Combine.o \ wrapper/combiner.o \ TexBuffer.o \ Tmem_nasm.o \ wrapper/config.o \ wrapper/filter.o \ support.o \ wrapper/2xsai.o \ wrapper/hq2x.o \ wrapper/hq4x.o \ Config.o all: plugins/Glide64.so instruction plugins/Glide64.so: font.h cursor.h $(OBJECTS) mkdir -p plugins $(LD) -shared -Wl,-Bsymbolic $(GTK_LIBS) $(LDFLAGS) -o $@ $(OBJECTS) font.h: compiletex ./compiletex font.tex font.h font cursor.h: compiletex ./compiletex cursor.tex cursor.h cursor compiletex: compiletex.o $(LD) -o $@ compiletex.o Tmem_nasm.o: Tmem_nasm.asm nasm -f elf $< instruction: $(warning please copy plugins/Glide64.so AND Glide64.ini in the plugins/ folder of the emulator) clean: rm -rf $(OBJECTS) $(ALL) compiletex compiletex.o font.h cursor.h rebuild: clean $(ALL)