Tried to set up Windows static linking.
This commit is contained in:
parent
52917c7e71
commit
e114502605
|
@ -23,7 +23,7 @@ This README is being written.<br>
|
||||||
*Note that today's entry may be updated later today.*
|
*Note that today's entry may be updated later today.*
|
||||||
|
|
||||||
* **29 May 2016**
|
* **29 May 2016**
|
||||||
* Thanks to @pcwalton, we can now statically link libui! Simply do `make STATIC=1` instead of just `make`.
|
* Thanks to @pcwalton, we can now statically link libui! Simply do `make STATIC=1` instead of just `make`. Right now it only works on GTK+ and OS X.
|
||||||
|
|
||||||
* **28 May 2016**
|
* **28 May 2016**
|
||||||
* As promised, **the minimum system requirements are now OS X 10.8 and GTK+ 3.10 for OS X and Unix, respectively**.
|
* As promised, **the minimum system requirements are now OS X 10.8 and GTK+ 3.10 for OS X and Unix, respectively**.
|
||||||
|
|
|
@ -97,7 +97,7 @@ endif
|
||||||
|
|
||||||
# note: don't run cvtres directly; the linker does that for us
|
# note: don't run cvtres directly; the linker does that for us
|
||||||
$(OBJDIR)/%.rc.o: $$(subst _,/,%).rc $(HFILES) | $(OBJDIR)
|
$(OBJDIR)/%.rc.o: $$(subst _,/,%).rc $(HFILES) | $(OBJDIR)
|
||||||
@rc -nologo -v -fo $@ $<
|
@rc -nologo -v -fo $@ $(RCFLAGS) $<
|
||||||
@echo ====== Compiled $<
|
@echo ====== Compiled $<
|
||||||
|
|
||||||
$(OBJDIR) $(OUTDIR):
|
$(OBJDIR) $(OUTDIR):
|
||||||
|
|
|
@ -45,8 +45,12 @@ ifeq ($(TOOLCHAIN),gcc)
|
||||||
LDFLAGS += -pthread
|
LDFLAGS += -pthread
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
# TODO is there an equivalent to -L?
|
ifeq (,$(STATIC))
|
||||||
LDFLAGS += $(OUTDIR)/libui.lib
|
# TODO is there an equivalent to -L?
|
||||||
|
LDFLAGS += $(OUTDIR)/libui.lib
|
||||||
|
else
|
||||||
|
LDFLAGS += $(OUTDIR)/libui.lib $(NATIVE_UI_LDFLAGS)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# executables are not shared libraries
|
# executables are not shared libraries
|
||||||
|
|
|
@ -67,10 +67,7 @@ RCFILES += \
|
||||||
# LONGTERM split into a separate file or put in GNUmakefile.libui somehow?
|
# LONGTERM split into a separate file or put in GNUmakefile.libui somehow?
|
||||||
|
|
||||||
# flags for the Windows API
|
# flags for the Windows API
|
||||||
# notice that usp10.lib comes before gdi32.lib
|
LDFLAGS += $(NATIVE_UI_LDFLAGS)
|
||||||
# TODO prune this list
|
|
||||||
LDFLAGS += \
|
|
||||||
user32.lib kernel32.lib usp10.lib gdi32.lib comctl32.lib uxtheme.lib msimg32.lib comdlg32.lib d2d1.lib dwrite.lib ole32.lib oleaut32.lib oleacc.lib uuid.lib
|
|
||||||
|
|
||||||
# flags for building a shared library
|
# flags for building a shared library
|
||||||
ifeq (,$(STATIC))
|
ifeq (,$(STATIC))
|
||||||
|
@ -83,3 +80,9 @@ endif
|
||||||
# no need for a soname
|
# no need for a soname
|
||||||
|
|
||||||
# TODO .def file
|
# TODO .def file
|
||||||
|
|
||||||
|
ifneq (,$(STATIC))
|
||||||
|
CFLAGS += -D_UI_STATIC
|
||||||
|
CXXFLAGS += -D_UI_STATIC
|
||||||
|
RCFLAGS += -D _UI_STATIC
|
||||||
|
endif
|
||||||
|
|
|
@ -7,3 +7,8 @@ STATICLIBSUFFIX = .lib
|
||||||
TOOLCHAIN = msvc
|
TOOLCHAIN = msvc
|
||||||
|
|
||||||
USESSONAME = 0
|
USESSONAME = 0
|
||||||
|
|
||||||
|
# notice that usp10.lib comes before gdi32.lib
|
||||||
|
# TODO prune this list
|
||||||
|
NATIVE_UI_LDFLAGS = \
|
||||||
|
user32.lib kernel32.lib usp10.lib gdi32.lib comctl32.lib uxtheme.lib msimg32.lib comdlg32.lib d2d1.lib dwrite.lib ole32.lib oleaut32.lib oleacc.lib uuid.lib
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
// this is the Common Controls 6 manifest
|
// this is the Common Controls 6 manifest
|
||||||
// TODO set up the string values here
|
// TODO set up the string values here
|
||||||
|
#ifndef _UI_STATIC
|
||||||
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest"
|
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest"
|
||||||
|
#endif
|
||||||
|
|
||||||
// this is the dialog template used by tab pages; see windows/tabpage.c for details
|
// this is the dialog template used by tab pages; see windows/tabpage.c for details
|
||||||
rcTabPageDialog DIALOGEX 0, 0, 100, 100
|
rcTabPageDialog DIALOGEX 0, 0, 100, 100
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
|
|
||||||
// for the manifest
|
// for the manifest
|
||||||
|
#ifndef _UI_STATIC
|
||||||
#define ISOLATION_AWARE_ENABLED 1
|
#define ISOLATION_AWARE_ENABLED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// get Windows version right; right now Windows Vista
|
// get Windows version right; right now Windows Vista
|
||||||
// unless otherwise stated, all values from Microsoft's sdkddkver.h
|
// unless otherwise stated, all values from Microsoft's sdkddkver.h
|
||||||
|
|
Loading…
Reference in New Issue