2023-04-26 16:42:55 +02:00
|
|
|
# Makefile to build x48 without autotools
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
CFLAGS = -g -O2 -Wall
|
|
|
|
LIBS = -lm -lX11 -lXext -lhistory -lreadline
|
|
|
|
|
|
|
|
all: mkcard checkrom dump2rom x48
|
|
|
|
|
|
|
|
# Binaries
|
2023-04-26 16:58:42 +02:00
|
|
|
mkcard: src/mkcard.o
|
2023-04-26 16:48:46 +02:00
|
|
|
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
2023-04-26 16:42:55 +02:00
|
|
|
|
2023-04-26 16:58:42 +02:00
|
|
|
dump2rom: src/dump2rom.o
|
2023-04-26 16:48:46 +02:00
|
|
|
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
2023-04-26 16:42:55 +02:00
|
|
|
|
2023-04-26 16:58:42 +02:00
|
|
|
checkrom: src/checkrom.o src/romio.o
|
2023-04-26 16:48:46 +02:00
|
|
|
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
2023-04-26 16:42:55 +02:00
|
|
|
|
|
|
|
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
|
2023-04-26 16:48:46 +02:00
|
|
|
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
2023-04-26 16:42:55 +02:00
|
|
|
|
|
|
|
# Cleaning
|
|
|
|
clean:
|
2023-04-26 16:48:46 +02:00
|
|
|
rm -f src/*.o
|
2023-04-26 16:42:55 +02:00
|
|
|
|
|
|
|
clean-all: clean
|
2023-04-26 16:48:46 +02:00
|
|
|
rm -f x48 mkcard checkrom dump2rom
|
2023-04-26 16:42:55 +02:00
|
|
|
|
|
|
|
# Formatting
|
|
|
|
pretty-code:
|
2023-04-26 16:48:46 +02:00
|
|
|
clang-format -i src/*.c src/*.h
|