From a159711de14873c36df9ccd13727eea8e585d3f2 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 25 Mar 2024 12:56:55 +0100 Subject: Remove unused make files --- exports/.gitignore | 1 - exports/Makefile | 24 ------------------------ exports/generate_lib.ps1 | 30 ------------------------------ 3 files changed, 55 deletions(-) delete mode 100644 exports/.gitignore delete mode 100644 exports/Makefile delete mode 100644 exports/generate_lib.ps1 diff --git a/exports/.gitignore b/exports/.gitignore deleted file mode 100644 index 5e5615b..0000000 --- a/exports/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/lib/* diff --git a/exports/Makefile b/exports/Makefile deleted file mode 100644 index 6608ee0..0000000 --- a/exports/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.PHONY: build clean - -include common.mk - -ifeq ($(LIB_SUFFIX),.so) -# Add SONAME as cgo does not currently do this. Mostly for Android, see https://stackoverflow.com/a/48291044 -export override CGO_LDFLAGS += -Wl,-soname,$(LIB_FILE) -endif - -# Creates targets like 'lib/linux/amd64/libeduvpn_common.so' -build: lib/$(GOOS)/$(GOARCH)/$(LIB_FILE) -ifdef COPY_LIB_TO - install $< -Dt $(COPY_LIB_TO) -endif - -# Build shared library and remove lib prefix (if any) from header name -# GOOS and GOARCH envvars are set by common.mk -# This extra target prevents unnecessary rebuild -lib/$(GOOS)/$(GOARCH)/$(LIB_FILE): .. - CGO_ENABLED=1 go build -o $@ -buildmode=c-shared . - mv lib/$(GOOS)/$(GOARCH)/$(LIB_PREFIX)$(LIB_NAME_VERSION).h lib/$(GOOS)/$(GOARCH)/$(LIB_NAME).h || true # Normalize header name - -clean: - rm -rf ../exports/lib/* diff --git a/exports/generate_lib.ps1 b/exports/generate_lib.ps1 deleted file mode 100644 index ac452ca..0000000 --- a/exports/generate_lib.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -<# -.SYNOPSIS - Generate .lib import library file for specified .dll file. -.NOTES - Requires dumpbin & lib, may need to execute through VS developer shell. -#> - -param ( - [string]$DllPath -) - -# Compatible with both Windows PowerShell and PowerShell Core - -$ErrorActionPreference = "Stop" - -$dll = Get-Item $DllPath -$def = Join-Path $dll.Directory "$( $dll.BaseName ).def" -$lib = Join-Path $dll.Directory "$( $dll.BaseName ).lib" -$machine = (dumpbin /nologo /headers $dll.FullName | - Select-String -AllMatches 'machine \((.+)\)').Matches[0].Groups[1].Value - -"LIBRARY $( $dll.BaseName )`nEXPORTS`n" + ( -(dumpbin /nologo /exports $dll.FullName | - Select-String -AllMatches '\d+\s+\d+\s+[0-9A-Z]+\s+(\S+)').Matches | - % { $_.Groups[1].Value } | - where { $_[0] -ne '_' } | # Skip _cgo_dummy_export -Out-String) | - Set-Content $def - -lib /machine:$machine /def:"$def" /out:"$lib" -- cgit v1.2.3