[Makefile] make GUI configurable at compilation
This commit is contained in:
parent
3d70c997a4
commit
5263a13833
1 changed files with 8 additions and 7 deletions
15
Makefile
15
Makefile
|
@ -8,6 +8,7 @@ MAKEFLAGS +=-j$(NUM_CORES) -l$(NUM_CORES)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
|
GUI ?= sdl
|
||||||
OPTIM ?= 2
|
OPTIM ?= 2
|
||||||
|
|
||||||
CFLAGS = -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DPATCHLEVEL=$(PATCHLEVEL)
|
CFLAGS = -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DPATCHLEVEL=$(PATCHLEVEL)
|
||||||
|
@ -18,6 +19,12 @@ ifeq ($(FULL_WARNINGS), yes)
|
||||||
CFLAGS += -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-unused-function -Wconversion -Wdouble-promotion -Wno-sign-conversion -fsanitize=undefined -fsanitize-trap
|
CFLAGS += -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-unused-function -Wconversion -Wdouble-promotion -Wno-sign-conversion -fsanitize=undefined -fsanitize-trap
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### SDL UI
|
||||||
|
ifeq ($(GUI), sdl)
|
||||||
|
CFLAGS += $(shell pkg-config --cflags SDL_gfx sdl12_compat)
|
||||||
|
LIBS += $(shell pkg-config --libs SDL_gfx sdl12_compat)
|
||||||
|
endif
|
||||||
|
|
||||||
DOTOS = src/emu_serial.o \
|
DOTOS = src/emu_serial.o \
|
||||||
src/emu_emulate.o \
|
src/emu_emulate.o \
|
||||||
src/emu_init.o \
|
src/emu_init.o \
|
||||||
|
@ -27,15 +34,9 @@ DOTOS = src/emu_serial.o \
|
||||||
src/emu_timer.o \
|
src/emu_timer.o \
|
||||||
src/runtime_options.o \
|
src/runtime_options.o \
|
||||||
src/romio.o \
|
src/romio.o \
|
||||||
|
src/ui_$(GUI).o \
|
||||||
src/main.o
|
src/main.o
|
||||||
|
|
||||||
### SDL1.2 UI
|
|
||||||
DOTOS += src/ui_sdl.o
|
|
||||||
|
|
||||||
CFLAGS += $(shell pkg-config --cflags SDL_gfx sdl12_compat)
|
|
||||||
LIBS += $(shell pkg-config --libs SDL_gfx sdl12_compat)
|
|
||||||
### /SDL1.2 UI
|
|
||||||
|
|
||||||
### debugger
|
### debugger
|
||||||
DOTOS += src/debugger.o
|
DOTOS += src/debugger.o
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue