2019-02-28 05:35:30 +00:00
|
|
|
USE_DXGI ?= 1
|
|
|
|
|
2019-02-28 08:44:15 +00:00
|
|
|
OUTPUT = looking-glass-host
|
|
|
|
EXT =
|
|
|
|
|
2019-02-28 05:35:30 +00:00
|
|
|
CFLAGS = -std=gnu99 -Wall -Werror
|
|
|
|
CFLAGS += -g -O0
|
|
|
|
CFLAGS += -I.
|
|
|
|
CFLAGS += -I../common
|
|
|
|
|
2019-02-28 08:20:35 +00:00
|
|
|
OBJS = app.o
|
2019-02-28 05:35:30 +00:00
|
|
|
|
|
|
|
# if windows
|
|
|
|
ifdef OS
|
2019-02-28 08:46:33 +00:00
|
|
|
CC = gcc.exe
|
2019-02-28 09:50:22 +00:00
|
|
|
LDFLAGS = -L./windows/dll -mwindows
|
2019-02-28 08:20:35 +00:00
|
|
|
LIBS += -lsetupapi
|
|
|
|
OBJS += windows/platform.o
|
|
|
|
OBJS += windows/windebug.o
|
|
|
|
CFLAGS += -I../vendor/kvm-guest-drivers-windows
|
2019-02-28 08:44:15 +00:00
|
|
|
EXT = .exe
|
2019-02-28 05:35:30 +00:00
|
|
|
|
|
|
|
ifeq ($(USE_DXGI), 1)
|
2019-02-28 05:45:58 +00:00
|
|
|
CFLAGS += -DUSE_DXGI -DCOBJMACROS -DINITGUID
|
|
|
|
LIBS += -ld3d11 -ldxgi
|
2019-02-28 08:35:42 +00:00
|
|
|
DLLS += windows/dll/libd3d11.a
|
2019-02-28 08:44:15 +00:00
|
|
|
OBJS += windows/capture/dxgi.o
|
2019-02-28 05:35:30 +00:00
|
|
|
endif
|
2019-02-28 08:31:04 +00:00
|
|
|
else
|
2019-02-28 08:46:33 +00:00
|
|
|
CC = gcc
|
2019-02-28 08:31:04 +00:00
|
|
|
OBJS += linux/platform.o
|
2019-02-28 05:35:30 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(OBJS) $(DLLS)
|
2019-02-28 08:44:15 +00:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT)$(EXT) $(OBJS) $(LIBS)
|
2019-02-28 05:35:30 +00:00
|
|
|
|
|
|
|
clean:
|
2019-02-28 08:44:15 +00:00
|
|
|
rm -v $(OBJS) $(DLLS) $(OUTPUT)$(EXT)
|
2019-02-28 05:35:30 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
%.a: %.def
|
|
|
|
dlltool --def $< --output-lib $@
|