aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-18 17:15:15 +0000
committermarha <marha@users.sourceforge.net>2009-11-18 17:15:15 +0000
commitb6ebd3b00a6080469e40e83c1c97571fded386e2 (patch)
treecb2d605203e1fb54e5fd2c2e73a281cb00377f4f
parentcac6184d466da272f4eaf5d6dc8a072035523ebf (diff)
downloadvcxsrv-b6ebd3b00a6080469e40e83c1c97571fded386e2.tar.gz
vcxsrv-b6ebd3b00a6080469e40e83c1c97571fded386e2.tar.bz2
vcxsrv-b6ebd3b00a6080469e40e83c1c97571fded386e2.zip
Optimised makefile of libxcb\src
Avoid needless rebuilds.
-rw-r--r--libxcb/src/makefile109
-rw-r--r--libxcb/src/makefile.srcs13
-rw-r--r--makefile.before8
3 files changed, 29 insertions, 101 deletions
diff --git a/libxcb/src/makefile b/libxcb/src/makefile
index fe7b3410e..dfca38a6e 100644
--- a/libxcb/src/makefile
+++ b/libxcb/src/makefile
@@ -1,114 +1,21 @@
-XCBPROTO_XCBPYTHONDIR = ..\xcb-proto
-XCBPROTO_XCBINCLUDEDIR = ..\xcb-proto\src
LIBRARY=libxcb
CSRCS = \
xcb_conn.c xcb_out.c xcb_in.c xcb_ext.c xcb_xid.c \
- xcb_list.c xcb_util.c xcb_auth.c \
- xproto.c bigreq.c xc_misc.c
-
-# FIXME: find a way to autogenerate this from the XML files.
-
-EXTHEADERS += composite.h
-EXTSOURCES += composite.c
-EXTENSION_XML += composite.xml
-
-EXTHEADERS += damage.h
-EXTSOURCES += damage.c
-EXTENSION_XML += damage.xml
-
-EXTHEADERS += dpms.h
-EXTSOURCES += dpms.c
-EXTENSION_XML += dpms.xml
-
-EXTHEADERS += glx.h
-EXTSOURCES += glx.c
-EXTENSION_XML += glx.xml
-
-EXTHEADERS += randr.h
-EXTSOURCES += randr.c
-EXTENSION_XML += randr.xml
-
-EXTHEADERS += record.h
-EXTSOURCES += record.c
-EXTENSION_XML += record.xml
-
-EXTHEADERS += render.h
-EXTSOURCES += render.c
-EXTENSION_XML += render.xml
-
-EXTHEADERS += res.h
-EXTSOURCES += res.c
-EXTENSION_XML += res.xml
-
-EXTHEADERS += screensaver.h
-EXTSOURCES += screensaver.c
-EXTENSION_XML += screensaver.xml
-
-EXTHEADERS += shape.h
-EXTSOURCES += shape.c
-EXTENSION_XML += shape.xml
-
-EXTHEADERS += shm.h
-EXTSOURCES += shm.c
-EXTENSION_XML += shm.xml
-
-EXTHEADERS += sync.h
-EXTSOURCES += sync.c
-EXTENSION_XML += sync.xml
-
-EXTHEADERS += xevie.h
-EXTSOURCES += xevie.c
-EXTENSION_XML += xevie.xml
-
-EXTHEADERS += xf86dri.h
-EXTSOURCES += xf86dri.c
-EXTENSION_XML += xf86dri.xml
-
-EXTHEADERS += xfixes.h
-EXTSOURCES += xfixes.c
-EXTENSION_XML += xfixes.xml
-
-EXTHEADERS += xinerama.h
-EXTSOURCES += xinerama.c
-EXTENSION_XML += xinerama.xml
-
-EXTHEADERS += xinput.h
-EXTSOURCES += xinput.c
-EXTENSION_XML += xinput.xml
-
-EXTHEADERS += xprint.h
-EXTSOURCES += xprint.c
-EXTENSION_XML += xprint.xml
-
-EXTHEADERS += xselinux.h
-EXTSOURCES += xselinux.c
-EXTENSION_XML += xselinux.xml
-
-EXTHEADERS += xtest.h
-EXTSOURCES += xtest.c
-EXTENSION_XML += xtest.xml
-
-EXTHEADERS += xv.h
-EXTSOURCES += xv.c
-EXTENSION_XML += xv.xml
-
-EXTHEADERS += xvmc.h
-EXTSOURCES += xvmc.c
-EXTENSION_XML += xvmc.xml
+ xcb_list.c xcb_util.c xcb_auth.c
DEFINES += PTW32_STATIC_LIB
-BUILT_SOURCES = $(EXTSOURCES) $(EXTHEADERS)
+XCBPROTO_XCBINCLUDEDIR = ..\xcb-proto\src
-CSRCS += $(EXTSOURCES)
+XMLFILES := $(notdir $(wildcard $(XCBPROTO_XCBINCLUDEDIR)\*.xml))
-$(EXTHEADERS) $(EXTSOURCES): c_client.py
+EXTSOURCES := $(XMLFILES:%.xml=%.c)
+CSRCS += $(EXTSOURCES)
-%.h: $(XCBPROTO_XCBINCLUDEDIR)\%.xml
- python c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $<
+EXTHEADERS = $(XMLFILES:%.xml=%.h)
-%.c: $(XCBPROTO_XCBINCLUDEDIR)\%.xml
- python c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $<
+$(EXTHEADERS) $(EXTSOURCES): c_client.py
+load_makefile NORELDBG=1 makefile.srcs
diff --git a/libxcb/src/makefile.srcs b/libxcb/src/makefile.srcs
new file mode 100644
index 000000000..2d4846a89
--- /dev/null
+++ b/libxcb/src/makefile.srcs
@@ -0,0 +1,13 @@
+ifneq ($(NORELDBG),1)
+$(error NORELDBG should have been set to 1)
+endif
+
+XCBPROTO_XCBPYTHONDIR = ..\xcb-proto
+XCBPROTO_XCBINCLUDEDIR = ..\xcb-proto\src
+
+%.h: $(XCBPROTO_XCBINCLUDEDIR)\%.xml
+ python c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $<
+
+%.c: $(XCBPROTO_XCBINCLUDEDIR)\%.xml
+ python c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $<
+
diff --git a/makefile.before b/makefile.before
index 3f7a3b723..5713a47c4 100644
--- a/makefile.before
+++ b/makefile.before
@@ -35,6 +35,14 @@ else
DEFINES += XKB
endif
+ifeq ($(NORELDBG),1)
+# This all is here to avoid unnecessary rebuilds when switching between release and debug and MAKESERVER
+OBJDIR?=obj
+OBJDIRPREFIX=noreldbg
+DEBUG=0
+MAKESERVER=0
+endif
+
ifeq ($(DEBUG),1)
CCFLAGS += -MDd -RTCc -RTC1 -Od -GS -GR -Zi
LINKFLAGS += /DEBUG