mirror of
https://github.com/kinnay/Wii-U-Firmware-Emulator.git
synced 2024-05-16 03:10:15 -04:00
70974277af
* debugger: Use libreadline for the prompt This fixes the issue where ^D would put the debugger into an infinite loop, and adds support for persistent history, with familiar keybindings. I originally tried to make this new dependency optional, but your usage of make doesn’t really tend itself to this, feel free to tell me if you prefer another option. Co-authored-by: Yannik Marchand <ymarchand@me.com>
25 lines
495 B
Makefile
25 lines
495 B
Makefile
|
|
CXX ?= g++
|
|
|
|
FLAGS = -std=c++14 -O2 -g -flto -Wno-invalid-offsetof
|
|
|
|
LDFLAGS = $(FLAGS) -pthread
|
|
SRCFLAGS = $(FLAGS) -Isrc -MMD
|
|
|
|
SRC = $(shell find src/ -type f -name "*.cpp")
|
|
SRC += $(shell find src/ -type f -name "*.c")
|
|
OBJS = $(patsubst src/%,build/%.o,$(SRC))
|
|
|
|
main: $(OBJS)
|
|
$(CXX) -o $@ $(LDFLAGS) $(OBJS) -lreadline -lhistory -lcrypto
|
|
|
|
build/%.o: src/%
|
|
@mkdir -p $(dir $@)
|
|
$(CXX) $(SRCFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -rf build
|
|
rm -f main
|
|
|
|
-include $(OBJS:.o=.d)
|