diff --git a/c-host/Makefile b/c-host/Makefile index b93ddee2..885bbba0 100644 --- a/c-host/Makefile +++ b/c-host/Makefile @@ -2,6 +2,9 @@ USE_DXGI ?= 1 CC=gcc.exe +OUTPUT = looking-glass-host +EXT = + CFLAGS = -std=gnu99 -Wall -Werror CFLAGS += -g -O0 CFLAGS += -I. @@ -16,22 +19,23 @@ ifdef OS OBJS += windows/platform.o OBJS += windows/windebug.o CFLAGS += -I../vendor/kvm-guest-drivers-windows + EXT = .exe ifeq ($(USE_DXGI), 1) CFLAGS += -DUSE_DXGI -DCOBJMACROS -DINITGUID LIBS += -ld3d11 -ldxgi DLLS += windows/dll/libd3d11.a - OBJS += capture/dxgi.o + OBJS += windows/capture/dxgi.o endif else OBJS += linux/platform.o endif all: $(OBJS) $(DLLS) - $(CC) $(CFLAGS) $(LDFLAGS) -o looking-glass-host.exe $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT)$(EXT) $(OBJS) $(LIBS) clean: - rm -v $(OBJS) $(DLLS) looking-glass-host.exe + rm -v $(OBJS) $(DLLS) $(OUTPUT)$(EXT) %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< diff --git a/c-host/capture/interfaces.h b/c-host/capture/interfaces.h index 1ff69f70..3818b6f8 100644 --- a/c-host/capture/interfaces.h +++ b/c-host/capture/interfaces.h @@ -20,7 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "interface.h" #if defined(USE_DXGI) -extern struct CaptureInterface Capture_DXGI; +struct CaptureInterface Capture_DXGI; #endif struct CaptureInterface * CaptureInterfaces[] = diff --git a/c-host/capture/dxgi.c b/c-host/windows/capture/dxgi.c similarity index 99% rename from c-host/capture/dxgi.c rename to c-host/windows/capture/dxgi.c index ad453313..d887db06 100644 --- a/c-host/capture/dxgi.c +++ b/c-host/windows/capture/dxgi.c @@ -17,7 +17,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "interface.h" +#include "capture/interface.h" #include "debug.h" #include "windows/windebug.h" diff --git a/c-host/capture/dxgi_extra.h b/c-host/windows/capture/dxgi_extra.h similarity index 100% rename from c-host/capture/dxgi_extra.h rename to c-host/windows/capture/dxgi_extra.h