-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 715 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 715 Bytes
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
30
31
32
33
34
35
36
# Makefile for the linux target.
#
#
# Denver project (NES emulator) (c) 2023 P. Santing
#
#
rwildcard=$(wildcard $1) $(foreach d,$1,$(call rwildcard,$(addsuffix /$(notdir $d),$(wildcard $(dir $d)*))))
CXX = c++
CXXFLAGS = -I imgui -I imgui/backends -c -O3 -Ofast -Wformat `sdl2-config --cflags`
LDFLAGS = -lSDL2 -lGL -lGLEW
SRCS := $(call rwildcard,./*.cpp) $(call rwildcard,./*.c)
BINSX := $(SRCS:%.cpp=%.o)
BINS := $(BINSX:%.c=%.o)
all: denver
denver: ${BINS}
${CXX} -o denver ${BINS} ${LDFLAGS}
%.o: %.cpp
${CXX} ${CXXFLAGS} $< -o $@
clean:
@echo "Cleaning up..."
rm -rvf ${BINS}
rm ./denver
rebuild: clean denver
sources:
@echo "Source files: ${SRCS}"
showbins:
@echo "Binary files: ${BINS}"