diff options
author | midipix <writeonce@midipix.org> | 2016-04-24 16:29:50 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-04-24 17:11:21 -0400 |
commit | d93e2d84fd3dd90592cc23cd5998ca803726cee9 (patch) | |
tree | 324e46aef10dc80ecc2ad853186ecbd7021e8e54 /sysinfo | |
parent | 295661031a10b00f23516cc6ab5ff830c8558aa7 (diff) | |
download | apimagic-d93e2d84fd3dd90592cc23cd5998ca803726cee9.tar.bz2 apimagic-d93e2d84fd3dd90592cc23cd5998ca803726cee9.tar.xz |
build system: PE targets: added import library version support.
Diffstat (limited to 'sysinfo')
-rw-r--r-- | sysinfo/os/any-os.mk | 3 | ||||
-rw-r--r-- | sysinfo/os/bsd.mk | 3 | ||||
-rw-r--r-- | sysinfo/os/darwin.mk | 3 | ||||
-rw-r--r-- | sysinfo/os/linux.mk | 3 | ||||
-rw-r--r-- | sysinfo/os/midipix.mk | 7 | ||||
-rw-r--r-- | sysinfo/os/mingw.mk | 6 | ||||
-rw-r--r-- | sysinfo/os/pe.mk | 48 | ||||
-rw-r--r-- | sysinfo/toolchain/binutils.mk | 1 | ||||
-rw-r--r-- | sysinfo/toolchain/llvm.mk | 1 |
9 files changed, 60 insertions, 15 deletions
diff --git a/sysinfo/os/any-os.mk b/sysinfo/os/any-os.mk index c052f31..cf8ec00 100644 --- a/sysinfo/os/any-os.mk +++ b/sysinfo/os/any-os.mk @@ -7,5 +7,6 @@ OS_IMPLIB_EXT = .invalid OS_LIBDEF_EXT = .invalid OS_ARCHIVE_EXT = .a OS_SONAME = symlink +OS_BINFMT = ELF -.PHONY: $(SHARED_IMPLIB) +.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) diff --git a/sysinfo/os/bsd.mk b/sysinfo/os/bsd.mk index 694c54f..6e8fac0 100644 --- a/sysinfo/os/bsd.mk +++ b/sysinfo/os/bsd.mk @@ -7,5 +7,6 @@ OS_IMPLIB_EXT = .invalid OS_LIBDEF_EXT = .invalid OS_ARCHIVE_EXT = .a OS_SONAME = symlink +OS_BINFMT = ELF -.PHONY: $(SHARED_IMPLIB) +.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) diff --git a/sysinfo/os/darwin.mk b/sysinfo/os/darwin.mk index 7ccdfde..5a0b99e 100644 --- a/sysinfo/os/darwin.mk +++ b/sysinfo/os/darwin.mk @@ -7,7 +7,8 @@ OS_IMPLIB_EXT = .invalid OS_LIBDEF_EXT = .invalid OS_ARCHIVE_EXT = .a OS_SONAME = symlink +OS_BINFMT = MACHO CFLAGS_OS += -D_DARWIN_C_SOURCE -.PHONY: $(SHARED_IMPLIB) +.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) diff --git a/sysinfo/os/linux.mk b/sysinfo/os/linux.mk index e2dcd2e..082026b 100644 --- a/sysinfo/os/linux.mk +++ b/sysinfo/os/linux.mk @@ -7,5 +7,6 @@ OS_IMPLIB_EXT = .invalid OS_LIBDEF_EXT = .invalid OS_ARCHIVE_EXT = .a OS_SONAME = symlink +OS_BINFMT = ELF -.PHONY: $(SHARED_IMPLIB) +.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) diff --git a/sysinfo/os/midipix.mk b/sysinfo/os/midipix.mk index 098ac68..d99b249 100644 --- a/sysinfo/os/midipix.mk +++ b/sysinfo/os/midipix.mk @@ -7,9 +7,4 @@ OS_IMPLIB_EXT = .lib.a OS_LIBDEF_EXT = .so.def OS_ARCHIVE_EXT = .a OS_SONAME = copy - -LDFLAGS_CONFIG += -mout-implib - -install-implib: shared-implib - mkdir -p $(DESTDIR)$(LIBDIR) - cp $(SHARED_IMPLIB) $(DESTDIR)$(LIBDIR) +OS_BINFMT = PE
\ No newline at end of file diff --git a/sysinfo/os/mingw.mk b/sysinfo/os/mingw.mk index a40239f..6ade8d5 100644 --- a/sysinfo/os/mingw.mk +++ b/sysinfo/os/mingw.mk @@ -7,10 +7,6 @@ OS_IMPLIB_EXT = .dll.a OS_LIBDEF_EXT = .def OS_ARCHIVE_EXT = .a OS_SONAME = copy +OS_BINFMT = PE CFLAGS_PIC = -LDFLAGS_CONFIG += -Wl,--out-implib,$(SHARED_IMPLIB) - -install-implib: shared-implib - mkdir -p $(DESTDIR)$(LIBDIR) - cp $(SHARED_IMPLIB) $(DESTDIR)$(LIBDIR) diff --git a/sysinfo/os/pe.mk b/sysinfo/os/pe.mk new file mode 100644 index 0000000..0b50df2 --- /dev/null +++ b/sysinfo/os/pe.mk @@ -0,0 +1,48 @@ +LDFLAGS_IMPLIB += -Wl,--output-def +LDFLAGS_IMPLIB += -Wl,$(IMPLIB_DEF) + +implib: implib-ver implib-soname implib-solink + +implib-ver: shared-lib $(IMPLIB_VER) + +implib-soname: shared-lib $(IMPLIB_SONAME) + +implib-solink: shared-lib $(IMPLIB_SOLINK) + +$(IMPLIB_DEF): shared-lib + +$(IMPLIB_VER): $(IMPLIB_DEF) + $(DLLTOOL) -l $(IMPLIB_VER) -d $(IMPLIB_DEF) -D $(DSO_VER) + +$(IMPLIB_SONAME): $(IMPLIB_DEF) + $(DLLTOOL) -l $(IMPLIB_SONAME) -d $(IMPLIB_DEF) -D $(DSO_SONAME) + +$(IMPLIB_SOLINK): $(IMPLIB_SONAME) + rm -f $(IMPLIB_SOLINK).tmp + ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp + mv $(IMPLIB_SOLINK).tmp $(IMPLIB_SOLINK) + +install-implib: install-implib-ver \ + install-implib-soname \ + install-implib-solink + +install-implib-ver: implib-ver + mkdir -p $(DESTDIR)$(LIBDIR) + cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR) + +install-implib-soname: implib-soname + mkdir -p $(DESTDIR)$(LIBDIR) + cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR) + +install-implib-solink: implib-soname + mkdir -p $(DESTDIR)$(LIBDIR) + rm -f $@.tmp + ln -s $(IMP_SONAME) $@.tmp + mv $@.tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK) + +clean-implib: + rm -f $(SHARED_LIB) + rm -f $(IMPLIB_DEF) + rm -f $(IMPLIB_VER) + rm -f $(IMPLIB_SONAME) + rm -f $(IMPLIB_SOLINK) diff --git a/sysinfo/toolchain/binutils.mk b/sysinfo/toolchain/binutils.mk index a29ac0c..3232915 100644 --- a/sysinfo/toolchain/binutils.mk +++ b/sysinfo/toolchain/binutils.mk @@ -15,3 +15,4 @@ CXXFILT = $(CROSS_COMPILE)c++filt ELFEDIT = $(CROSS_COMPILE)elfedit OBJCOPY = $(CROSS_COMPILE)objcopy READELF = $(CROSS_COMPILE)readelf +DLLTOOL = $(CROSS_COMPILE)dlltool diff --git a/sysinfo/toolchain/llvm.mk b/sysinfo/toolchain/llvm.mk index 3c805a8..65b5396 100644 --- a/sysinfo/toolchain/llvm.mk +++ b/sysinfo/toolchain/llvm.mk @@ -15,3 +15,4 @@ CXXFILT = $(CROSS_COMPILE)c++filt ELFEDIT = $(CROSS_COMPILE)elfedit OBJCOPY = $(CROSS_COMPILE)objcopy READELF = $(CROSS_COMPILE)readelf +DLLTOOL = $(CROSS_COMPILE)dlltool |