From b42af6500bf5f8c2ce2976aad7e176875512b0e8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 9 May 2014 22:01:31 +0200 Subject: add framework link for quartz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5f69e33..20d53ff 100644 --- a/Makefile +++ b/Makefile @@ -85,8 +85,24 @@ endif ifeq ($(FAKE_MAC),y) LIBS_quartz = $(LIBS_randr) endif +LD_idcrtc = +LD_iccprofile = +LD_randr = +LD_vidmode = +LD_drm = +LD_w32gdi = +F_ApplicationServices = /System/Library/Frameworks/ApplicationServices.framework +I_ApplicationServices = $(F_ApplicationServices)/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers +LD_quartz = -I$(I_ApplicationServices) -F$(F_ApplicationServices) -framework ApplicationServices +ifeq ($(FAKE_W32),y) +LD_w32gdi = $(LD_randr) +endif +ifeq ($(FAKE_MAC),y) +LD_quartz = $(LD_randr) +endif LIBS = python3 $(foreach B,$(SERVER_BINDINGS) $(EXECS),$(LIBS_$(B))) -FLAGS = $$($(PKGCONFIG) --cflags $(LIBS)) -std=$(STD) $(WARN) $(OPTIMISE) -fPIC $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) +FLAGS = $$($(PKGCONFIG) --cflags $(LIBS)) -std=$(STD) $(WARN) $(OPTIMISE) \ + -fPIC $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) # Resource files DATAFILES = 2deg 10deg redshift redshift_old @@ -119,12 +135,12 @@ command: $(foreach C,$(CBINDINGS),bin/$(C)) $(foreach E,$(EXECLIBS),bin/$(E)) bi bin/blueshift_idcrtc: LIBS_=LIBS_idcrtc bin/blueshift_idcrtc: obj/blueshift_idcrtc.o @mkdir -p bin - $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $($(LIBS_))) -o $@ $^ + $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $(LIBS_$(L))) -o $@ $^ bin/blueshift_iccprofile: LIBS_=LIBS_iccprofile bin/blueshift_iccprofile: obj/blueshift_iccprofile.o @mkdir -p bin - $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $($(LIBS_))) -o $@ $^ + $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $(LIBS_$(L))) -o $@ $^ bin/blueshift_drm.so: LIBS_=LIBS_drm bin/blueshift_randr.so: LIBS_=LIBS_randr @@ -133,7 +149,7 @@ bin/blueshift_w32gdi.so: LIBS_=LIBS_w32gdi bin/blueshift_quartz.so: LIBS_=LIBS_quartz bin/%.so: obj/%.o obj/%_c.o @mkdir -p bin - $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $($(LIBS_))) -shared -o $@ $^ + $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $(LIBS_$(L))) $(LD_$(L)) -shared -o $@ $^ obj/%.o: src/%.c @mkdir -p obj @@ -155,14 +171,14 @@ ifeq ($(FAKE_W32),y) obj/blueshift_w32gdi_c.o: src/blueshift_w32gdi_c.c src/blueshift_w32gdi_c.h \ obj/fake_w32gdi.o src/fake_w32gdi.h @mkdir -p bin - $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $($(LIBS_))) -shared -DFAKE_W32GDI -o $@ $^ + $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $(LIBS_$(L))) $(LD_$(L)) -shared -DFAKE_W32GDI -o $@ $^ endif ifeq ($(FAKE_MAC),y) obj/blueshift_quartz_c.o: src/blueshift_quartz_c.c src/blueshift_quartz_c.h \ obj/fake_quartz.o src/fake_quartz.h @mkdir -p bin - $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $($(LIBS_))) -shared -DFAKE_QUARTZ -o $@ $^ + $(CC) $(FLAGS) $$($(PKGCONFIG) --libs $(LIBS_$(L))) $(LD_$(L)) -shared -DFAKE_QUARTZ -o $@ $^ endif -- cgit v1.2.3-70-g09d2