diff options
author | Alon Levy <alevy@redhat.com> | 2013-05-25 01:42:38 -0400 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2013-05-25 01:42:38 -0400 |
commit | 51b52c75ac8af616cf367de5b71e2a9c90e0d5cd (patch) | |
tree | 61fec36cc21f9a4fb6794777d115e2b190eac8a8 | |
parent | 9572ead92425d4792e0410acb4a6225cf6a441e3 (diff) |
mingw: build qxldd.dllwip/mingw
-rw-r--r-- | Makefile.am | 57 |
1 files changed, 44 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am index 366bf47..311af5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,11 +5,12 @@ DRIVERS = C_INCLUDES = \ -I$(top_srcdir)/xddm/include \ -I$(top_srcdir)/include/ddk \ + -I$(top_srcdir)/include \ $(SPICE_PROTOCOL_CFLAGS) AM_CPPFLAGS = -D_X86_=1 -Di386=1 -DSTD_CALL -DCONDITION_HANDLING=1 -DNT_UP=1 -DNT_INST=0 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -D_WIN32_IE=0x0603 -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -DNTDDI_VERSION=0x05010200 -DKMDF_MAJOR_VERSION_STRING=01 -DDKMDF_MINOR_VERSION_STRING=009 -falign-functions=16 -AM_LDFLAGS = \ +AM_MINIPORTLDFLAGS = \ -Wl,--entry,_DriverEntry@8 \ -nostartfiles \ -nostdlib \ @@ -23,8 +24,24 @@ AM_LDFLAGS = \ -fms-extensions \ $(NULL) +# TODO: use the GS framework that DDK provides? DDK's entry point is GsDrvEnableDriver +# and not DrvEnableDriver. +AM_DISPLAYLDFLAGS = \ + -Wl,--entry,_DrvEnableDriver@12 \ + -nostartfiles \ + -shared \ + -Wl,--subsystem,native \ + -Wl,--stack,0x40000 \ + -Wl,--image-base,0x10000 \ + -Wl,--file-alignment,0x1000 \ + -Wl,--section-alignment,0x1000 \ + -mms-bitfields \ + -fms-extensions \ + $(NULL) -DRIVERS += qxl.sys + + +DRIVERS += qxl.sys qxldd.dll QXLHEADERS = \ xddm/include/murmur_hash2a.h \ @@ -40,9 +57,32 @@ QXLSOURCES = \ xddm/miniport/minimal_snprintf.c \ $(NULL) +QXLDDSOURCES = \ + xddm/display/brush.c \ + xddm/display/driver.c \ + xddm/display/mspace.c \ + xddm/display/pointer.c \ + xddm/display/quic.c \ + xddm/display/res.c \ + xddm/display/rop.c \ + xddm/display/surface.c \ + xddm/display/text.c + +%.o: %.c + $(CC) $(AM_CPPFLAGS) $(C_INCLUDES) -c -o $@ $^ + +#%.i: %.c +# $(CC) -E $(AM_CPPFLAGS) $(C_INCLUDES) -o $@ $^ + +#%.o: %.i +# $(CC) $(AM_CPPFLAGS) $(C_INCLUDES) -c -o $@ $^ + qxl.sys: $(QXLSOURCES) - $(CC) $(AM_CPPFLAGS) $(C_INCLUDES) -o $@ $(AM_LDFLAGS) $^ -lvideoprt -lhal -lntoskrnl - $(STRIP) $@ + $(CC) $(AM_CPPFLAGS) $(C_INCLUDES) -o $@ $(AM_MINIPORTLDFLAGS) $^ -lvideoprt -lhal -lntoskrnl + pefixup $@ -sections -exports + +qxldd.dll: $(patsubst %.c,%.o,$(QXLDDSOURCES)) + $(CC) $(AM_CPPFLAGS) $(C_INCLUDES) -o $@ $(AM_DISPLAYLDFLAGS) $^ -lwin32k pefixup $@ -sections -exports #-lwin32k -lmingwex @@ -53,22 +93,13 @@ dummy_SOURCES = \ $(QXLHEADERS) \ $(QXLSOURCES) \ xddm/miniport/qxl.h \ - xddm/display/brush.c \ - xddm/display/driver.c \ - xddm/display/mspace.c \ xddm/display/mspace.h \ - xddm/display/pointer.c \ - xddm/display/quic.c \ xddm/display/quic_config.h \ xddm/display/quic.h \ xddm/display/qxldd.h \ - xddm/display/res.c \ xddm/display/res.h \ - xddm/display/rop.c \ xddm/display/rop.h \ - xddm/display/surface.c \ xddm/display/surface.h \ - xddm/display/text.c \ xddm/display/utils.h \ $(NULL) |