summaryrefslogtreecommitdiffhomepage
path: root/project/extras.mk
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-10 23:45:13 -0400
committermidipix <writeonce@midipix.org>2016-05-10 23:45:13 -0400
commit9c558eed45d42d3660abed5f416328269294d078 (patch)
treed7171fb255e136165165b1b84450064e041f37c4 /project/extras.mk
parent39423d0fa25237c2533f7f604edc209831382090 (diff)
downloadpemagine-9c558eed45d42d3660abed5f416328269294d078.tar.bz2
pemagine-9c558eed45d42d3660abed5f416328269294d078.tar.xz
build system: upgrade build system, eliminate differences in core definitions.
Prior to this patch, there were several differences between this project's build system and the one from which it was derived (sofort). Although the differences were very minor and for the most part related to this project being part of a free-standing, midipix-specific development framework, they still added an extra maintenance burden, specifically by requiring that common changes be applied via patch(1) rather than git-am(1). Following recent improvements to the common build system, it is now possible to have a free-standing, midipix-specific project without any changes to the core build system files, hence the current upgrade.
Diffstat (limited to 'project/extras.mk')
-rw-r--r--project/extras.mk21
1 files changed, 16 insertions, 5 deletions
diff --git a/project/extras.mk b/project/extras.mk
index fe95d37..d95c532 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -1,15 +1,26 @@
CFLAGS_SHARED_ATTR += -DPE_BUILD
CFLAGS_STATIC_ATTR += -DPE_STATIC
-CFLAGS_CONFIG += -DMIDIPIX_FREESTANDING -ffreestanding -D__NT$(HOST_BITS)
+CFLAGS_CONFIG += -DMIDIPIX_FREESTANDING -D__NT$(HOST_BITS)
CFLAGS_CONFIG += -UWIN32 -U_WIN32 -U__WIN32 -U__WIN32__
CFLAGS_CONFIG += -UWIN64 -U_WIN64 -U__WIN64 -U__WIN64__
-LDFLAGS_SHARED += --out-implib $(SHARED_IMPLIB)
-LDFLAGS_SHARED += --exclude-all-symbols
+LDFLAGS_SHARED += -Wl,--exclude-all-symbols
+LDFLAGS_SHARED += -nostdlib
ifeq ($(HOST_BITS),32)
- LDFLAGS_SHARED += --entry $(HOST_UNDERSCORE)pe_entry_point@12
+ LDFLAGS_SHARED += -Wl,--entry -Wl,$(HOST_UNDERSCORE)pe_entry_point@12
else
- LDFLAGS_SHARED += --entry $(HOST_UNDERSCORE)pe_entry_point
+ LDFLAGS_SHARED += -Wl,--entry -Wl,$(HOST_UNDERSCORE)pe_entry_point
endif
+
+install-headers-custom: install-headers-default
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)/bits
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)/bits/nt32
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)/bits/nt64
+
+ cp $(API_HEADERS_NT32) \
+ $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)/bits/nt32
+
+ cp $(API_HEADERS_NT64) \
+ $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)/bits/nt64