-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 915 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# COPYRIGHT (C) HARRY CLARK 2024
# SEGA MEGA DRIVE EMULATOR
SRC_DIR = src
INC_DIR = include
SOUND_DIR = $(SRC_DIR)/sound
VIDEO_DIR = $(SRC_DIR)/video
LIB68K_DIR = lib68k/src
LIB68K_FILES = $(LIB68K_DIR)/68K.c $(LIB68K_DIR)/68KOPCODE.c
MDFILES = $(SRC_DIR)/md.c $(SOUND_DIR)/psg.c $(VIDEO_DIR)/vdp.c $(SOUND_DIR)/ym2612.c $(SRC_DIR)/cartridge.c
CFILES = $(LIB68K_FILES) $(MDFILES) $(SRC_DIR)/main.c
OFILES = $(CFILES:.c=.o)
CFLAGS = -std=c99 -Wall -Wextra -Wno-int-conversion -Wno-incompatible-pointer-types \
-I$(INC_DIR) -I$(INC_DIR)/cpu -I$(INC_DIR)/sound -I$(INC_DIR)/video
LDFLAGS = -lSDL2 -l68k
all: mdemu
mdemu: $(OFILES)
$(CC) $(OFILES) -o mdemu $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OFILES) mdemu