From 26e14f4143ec690a120e197a3adf547145e4ce59 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 20 Dec 2016 20:53:41 +0000 Subject: create free-standing, libpsxscl-based project skeleton. --- sysinfo/os/any-os.mk | 12 +++++++++ sysinfo/os/cygwin.mk | 12 +++++++++ sysinfo/os/midipix.mk | 10 +++++++ sysinfo/os/mingw.mk | 13 +++++++++ sysinfo/os/mingw32.mk | 1 + sysinfo/os/mingw64.mk | 1 + sysinfo/os/msys.mk | 13 +++++++++ sysinfo/os/pe.mk | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 136 insertions(+) create mode 100644 sysinfo/os/any-os.mk create mode 100644 sysinfo/os/cygwin.mk create mode 100644 sysinfo/os/midipix.mk create mode 100644 sysinfo/os/mingw.mk create mode 100644 sysinfo/os/mingw32.mk create mode 100644 sysinfo/os/mingw64.mk create mode 100644 sysinfo/os/msys.mk create mode 100644 sysinfo/os/pe.mk (limited to 'sysinfo/os') diff --git a/sysinfo/os/any-os.mk b/sysinfo/os/any-os.mk new file mode 100644 index 0000000..cf8ec00 --- /dev/null +++ b/sysinfo/os/any-os.mk @@ -0,0 +1,12 @@ +OS = any-os +OS_APP_PREFIX = +OS_APP_SUFFIX = +OS_LIB_PREFIX = lib +OS_LIB_SUFFIX = .so +OS_IMPLIB_EXT = .invalid +OS_LIBDEF_EXT = .invalid +OS_ARCHIVE_EXT = .a +OS_SONAME = symlink +OS_BINFMT = ELF + +.PHONY: $(IMPLIB_DEF) $(IMPLIB_VER) $(IMPLIB_SONAME) $(IMPLIB_SOLINK) diff --git a/sysinfo/os/cygwin.mk b/sysinfo/os/cygwin.mk new file mode 100644 index 0000000..a257b88 --- /dev/null +++ b/sysinfo/os/cygwin.mk @@ -0,0 +1,12 @@ +OS = cygwin +OS_APP_PREFIX = +OS_APP_SUFFIX = .exe +OS_LIB_PREFIX = lib +OS_LIB_SUFFIX = .dll +OS_IMPLIB_EXT = .dll.a +OS_LIBDEF_EXT = .def +OS_ARCHIVE_EXT = .a +OS_SONAME = copy +OS_BINFMT = PE + +CFLAGS_PIC = diff --git a/sysinfo/os/midipix.mk b/sysinfo/os/midipix.mk new file mode 100644 index 0000000..31ba374 --- /dev/null +++ b/sysinfo/os/midipix.mk @@ -0,0 +1,10 @@ +OS = midipix +OS_APP_PREFIX = +OS_APP_SUFFIX = +OS_LIB_PREFIX = lib +OS_LIB_SUFFIX = .so +OS_IMPLIB_EXT = .lib.a +OS_LIBDEF_EXT = .so.def +OS_ARCHIVE_EXT = .a +OS_SONAME = copy +OS_BINFMT = PE diff --git a/sysinfo/os/mingw.mk b/sysinfo/os/mingw.mk new file mode 100644 index 0000000..c13e61d --- /dev/null +++ b/sysinfo/os/mingw.mk @@ -0,0 +1,13 @@ +OS = mingw +OS_APP_PREFIX = +OS_APP_SUFFIX = .exe +OS_LIB_PREFIX = lib +OS_LIB_SUFFIX = .dll +OS_IMPLIB_EXT = .dll.a +OS_LIBDEF_EXT = .def +OS_ARCHIVE_EXT = .a +OS_SONAME = copy +OS_BINFMT = PE + +CFLAGS_PIC = +CFLAGS_OS += -U__STRICT_ANSI__ diff --git a/sysinfo/os/mingw32.mk b/sysinfo/os/mingw32.mk new file mode 100644 index 0000000..542b6a9 --- /dev/null +++ b/sysinfo/os/mingw32.mk @@ -0,0 +1 @@ +include $(PROJECT_DIR)/sysinfo/os/mingw.mk diff --git a/sysinfo/os/mingw64.mk b/sysinfo/os/mingw64.mk new file mode 100644 index 0000000..542b6a9 --- /dev/null +++ b/sysinfo/os/mingw64.mk @@ -0,0 +1 @@ +include $(PROJECT_DIR)/sysinfo/os/mingw.mk diff --git a/sysinfo/os/msys.mk b/sysinfo/os/msys.mk new file mode 100644 index 0000000..b70cc78 --- /dev/null +++ b/sysinfo/os/msys.mk @@ -0,0 +1,13 @@ +OS = msys +OS_APP_PREFIX = +OS_APP_SUFFIX = .exe +OS_LIB_PREFIX = lib +OS_LIB_SUFFIX = .dll +OS_IMPLIB_EXT = .dll.a +OS_LIBDEF_EXT = .def +OS_ARCHIVE_EXT = .a +OS_SONAME = copy +OS_BINFMT = PE + +CFLAGS_PIC = +CFLAGS_OS += -U__STRICT_ANSI__ diff --git a/sysinfo/os/pe.mk b/sysinfo/os/pe.mk new file mode 100644 index 0000000..bbb74b2 --- /dev/null +++ b/sysinfo/os/pe.mk @@ -0,0 +1,74 @@ +LDFLAGS_IMPLIB += -Wl,--output-def +LDFLAGS_IMPLIB += -Wl,$(IMPLIB_DEF) +LDFLAGS_SHARED += $(LDFLAGS_IMPLIB) + +LDFLAGS_SONAME += -Wl,-soname +LDFLAGS_SONAME += -Wl,$(DSO_SONAME) +LDFLAGS_SHARED += $(LDFLAGS_SONAME) + +PE_SUBSYSTEM ?= windows +LDFLAGS_COMMON += -Wl,--subsystem=$(PE_SUBSYSTEM) + +implib: implib-ver package-implib-soname package-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) + +install-implib: install-implib-ver \ + package-install-implib-soname \ + package-install-implib-solink + +install-implib-ver: implib-ver + mkdir -p $(DESTDIR)$(LIBDIR) + cp $(IMPLIB_VER) $(DESTDIR)$(LIBDIR) + +clean-implib: + rm -f $(SHARED_LIB) + rm -f $(IMPLIB_DEF) + rm -f $(IMPLIB_VER) + rm -f $(IMPLIB_SONAME) + rm -f $(IMPLIB_SOLINK) + + +ifeq ($(AVOID_VERSION),yes) + +package-implib-soname: +package-implib-solink: +package-install-implib-soname: +package-install-implib-solink: + +else + +package-implib-soname: implib-soname +package-implib-solink: implib-solink +package-install-implib-soname: install-implib-soname +package-install-implib-solink: install-implib-solink + + +$(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-soname: implib-soname + mkdir -p $(DESTDIR)$(LIBDIR) + cp $(IMPLIB_SONAME) $(DESTDIR)$(LIBDIR) + +install-implib-solink: implib-soname + mkdir -p $(DESTDIR)$(LIBDIR) + rm -f $(IMPLIB_SOLINK).tmp + ln -s $(IMP_SONAME) $(IMPLIB_SOLINK).tmp + mv $(IMPLIB_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(IMP_SOLINK) + +endif -- cgit v1.2.3