mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 06:32:32 +01:00
byuu says: Finally!! Compilation works once again on Windows. However, it's pretty buggy. Modality isn't really working right, you can still poke at other windows, but when you select ListView items, they redraw as empty boxes (need to process WM_DRAWITEM before checking modality.) The program crashes when you close it (probably a ruby driver's term() function, that's what it usually is.) The Layout::setEnabled(false) call isn't working right, so you get that annoying chiming sound and cursor movement when mapping keyboard keys to game inputs. The column sizing seems off a bit on first display for the Hotkeys tab. And probably lots more.
112 lines
2.2 KiB
Makefile
112 lines
2.2 KiB
Makefile
include nall/GNUmakefile
|
|
|
|
fc := fc
|
|
sfc := sfc
|
|
gb := gb
|
|
gba := gba
|
|
|
|
profile := accuracy
|
|
target := tomoko
|
|
|
|
# arch := x86
|
|
# console := true
|
|
|
|
# compiler
|
|
flags += -I. -O3
|
|
objects := libco
|
|
|
|
# profile-guided optimization mode
|
|
# pgo := instrument
|
|
# pgo := optimize
|
|
|
|
ifeq ($(pgo),instrument)
|
|
flags += -fprofile-generate
|
|
link += -lgcov
|
|
else ifeq ($(pgo),optimize)
|
|
flags += -fprofile-use
|
|
endif
|
|
|
|
# platform
|
|
ifeq ($(platform),windows)
|
|
ifeq ($(arch),x86)
|
|
flags += -m32
|
|
link += -m32
|
|
endif
|
|
ifeq ($(console),true)
|
|
link += -mconsole
|
|
else
|
|
link += -mwindows
|
|
endif
|
|
link += -mthreads -luuid -lkernel32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32 -lole32 -lws2_32
|
|
link += -Wl,-enable-auto-import
|
|
link += -Wl,-enable-runtime-pseudo-reloc
|
|
else ifeq ($(platform),macosx)
|
|
flags += -march=native
|
|
else ifeq ($(platform),linux)
|
|
flags += -march=native -fopenmp
|
|
link += -fopenmp
|
|
link += -Wl,-export-dynamic
|
|
link += -lX11 -lXext -ldl
|
|
else ifeq ($(platform),bsd)
|
|
flags += -march=native -fopenmp
|
|
link += -fopenmp
|
|
link += -Wl,-export-dynamic
|
|
link += -lX11 -lXext
|
|
else
|
|
$(error unsupported platform.)
|
|
endif
|
|
|
|
ui := target-$(target)
|
|
|
|
# implicit rules
|
|
compile = \
|
|
$(strip \
|
|
$(if $(filter %.c,$<), \
|
|
$(compiler) $(cflags) $(flags) $1 -c $< -o $@, \
|
|
$(if $(filter %.cpp,$<), \
|
|
$(compiler) $(cppflags) $(flags) $1 -c $< -o $@ \
|
|
) \
|
|
) \
|
|
)
|
|
|
|
%.o: $<; $(call compile)
|
|
|
|
all: build;
|
|
|
|
obj/libco.o: libco/libco.c libco/*
|
|
|
|
include $(ui)/GNUmakefile
|
|
flags := $(flags) $(foreach o,$(call strupper,$(options)),-D$o)
|
|
|
|
# targets
|
|
clean:
|
|
-@$(call delete,out/*)
|
|
-@$(call delete,obj/*.o)
|
|
-@$(call delete,obj/*.a)
|
|
-@$(call delete,obj/*.so)
|
|
-@$(call delete,obj/*.dylib)
|
|
-@$(call delete,obj/*.dll)
|
|
|
|
archive:
|
|
if [ -f higan.tar.xz ]; then rm higan.tar.xz; fi
|
|
tar -cJf higan.tar.xz `ls`
|
|
|
|
sync:
|
|
ifeq ($(shell id -un),byuu)
|
|
if [ -d ./libco ]; then rm -r ./libco; fi
|
|
if [ -d ./nall ]; then rm -r ./nall; fi
|
|
if [ -d ./ruby ]; then rm -r ./ruby; fi
|
|
if [ -d ./hiro ]; then rm -r ./hiro; fi
|
|
cp -r ../libco ./libco
|
|
cp -r ../nall ./nall
|
|
cp -r ../ruby ./ruby
|
|
cp -r ../hiro ./hiro
|
|
rm -r libco/doc
|
|
rm -r libco/-test
|
|
rm -r nall/-test
|
|
rm -r ruby/-test
|
|
rm -r hiro/-test
|
|
endif
|
|
|
|
help:;
|