mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
c1a82e853d
This moves the bulk of the rendering code into seperate rendering modules cleaning up much of intertwined SDL & OpenGL mess.
37 lines
823 B
Makefile
37 lines
823 B
Makefile
BINARY = looking-glass-client
|
|
CFLAGS = -g -Og -std=gnu99 -march=native -Wall -Werror -I./ -I../common -DDEBUG
|
|
LDFLAGS = -lrt
|
|
|
|
CFLAGS += -ffast-math
|
|
CFLAGS += -fdata-sections -ffunction-sections
|
|
LDFLAGS += -Wl,--gc-sections
|
|
|
|
LIBS = sdl2 SDL2_ttf gl glu libssl openssl spice-protocol
|
|
CFLAGS += $(shell pkg-config --cflags $(LIBS))
|
|
LDFLAGS += $(shell pkg-config --libs $(LIBS))
|
|
BUILD ?= .build
|
|
BIN ?= bin
|
|
|
|
OBJS = main.o \
|
|
spice/spice.o \
|
|
ivshmem/ivshmem.o \
|
|
renderers/basic.o \
|
|
renderers/opengl.o
|
|
|
|
BUILD_OBJS = $(foreach obj,$(OBJS),$(BUILD)/$(obj))
|
|
|
|
all: $(BIN)/$(BINARY)
|
|
|
|
$(BUILD)/%.o: %.c
|
|
@mkdir -p $(dir $@)
|
|
gcc -c $(CFLAGS) -o $@ $<
|
|
|
|
$(BIN)/$(BINARY): $(BUILD_OBJS)
|
|
@mkdir -p $(dir $(BIN)/$@)
|
|
gcc -o $(BIN)/$(BINARY) $(BUILD_OBJS) $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -rf $(BUILD) $(BIN)
|
|
|
|
.PHONY: clean
|