Wii-U-Firmware-Emulator/Makefile
linkmauve 70974277af
debugger: Use libreadline for the prompt (#11)
* 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>
2021-12-01 08:14:07 +01:00

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)