libx48ng/Makefile
2023-04-26 16:52:11 +02:00

32 lines
791 B
Makefile

# Makefile to build x48 without autotools
CC = gcc
CFLAGS = -g -O2 -Wall
LIBS = -lm -lX11 -lXext -lhistory -lreadline
all: mkcard checkrom dump2rom x48
# Binaries
mkcard: src/mkcard.c
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
dump2rom: src/dump2rom.c
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
checkrom: src/checkrom.c src/romio.o
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
x48: src/main.o src/actions.o src/debugger.o src/device.o src/disasm.o src/emulate.o src/errors.o src/init.o src/lcd.o src/memory.o src/register.o src/resources.o src/romio.o src/rpl.o src/serial.o src/timer.o src/x48_x11.o src/options.o src/resources.o
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
# Cleaning
clean:
rm -f src/*.o
clean-all: clean
rm -f x48 mkcard checkrom dump2rom
# Formatting
pretty-code:
clang-format -i src/*.c src/*.h