mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-13 01:38:20 +00:00
6a6e53f728
Since we do not use IRQs anymore we can use the ivshmem-plain device which doesn't need the ivshmem-server. The QEMU arguments now should be as follows: -device ivshmem-plain,memdev=ivshmem -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M Obviously adjusting the memory size as required. It is suggested that the shared memory file be created before the guest is started with the appropriate permissions, for example: touch /dev/shm/looking-glass chown user:kvm /dev/shm/looking-glass chmod 660 /dev/shm/looking-glass
39 lines
933 B
Makefile
39 lines
933 B
Makefile
BINARY = looking-glass-client
|
|
CFLAGS = -g -O3 -std=gnu99 -march=native -Wall -Werror -I./ -I../common -DDEBUG -DATOMIC_LOCKING
|
|
LDFLAGS = -lrt
|
|
|
|
CFLAGS += -ffast-math
|
|
CFLAGS += -fdata-sections -ffunction-sections
|
|
LDFLAGS += -Wl,--gc-sections
|
|
|
|
LIBS = sdl2 SDL2_ttf gl glu libssl openssl spice-protocol fontconfig x11
|
|
CFLAGS += $(shell pkg-config --cflags $(LIBS))
|
|
LDFLAGS += $(shell pkg-config --libs $(LIBS))
|
|
BUILD ?= .build
|
|
BIN ?= bin
|
|
|
|
CFLAGS += -DBUILD_VERSION='"$(shell git describe --always --long --dirty --abbrev=10 --tags)"'
|
|
|
|
OBJS = main.o \
|
|
lg-renderer.o \
|
|
spice/spice.o \
|
|
renderers/opengl.o
|
|
# renderers/opengl-basic.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 $@)
|
|
gcc -o $@ $(BUILD_OBJS) $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -rf $(BUILD) $(BIN)
|
|
|
|
.PHONY: clean
|