Skip to content

Commit

Permalink
makefile: ignore bytecode file when CPU arch is arm64.
Browse files Browse the repository at this point in the history
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Jan 1, 2024
1 parent ddc6d2c commit 7e54d6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@ UNAME_R := $(shell uname -r)
# Target Arch
#
BPFHEADER ?=
IGNORE_LESS52 ?=
ifeq ($(UNAME_M),aarch64)
ARCH = arm64
LINUX_ARCH = arm64
GO_ARCH = arm64
BPFHEADER = -I ./kern \
-I ./kern/bpf/arm64
AUTOGENCMD = ls -al kern/bpf/arm64/vmlinux.h
IGNORE_LESS52 = -ignore '.*_less52\.o'
else
# x86_64 default
ARCH = x86_64
Expand Down Expand Up @@ -256,7 +258,7 @@ RPM_SOURCE0 = $(ECAPTURE_NAME)-$(TAG).tar.gz

.PHONY:rpm
rpm:
@$(CMD_RPM_SETUP_TREE)
@$(CMD_RPM_SETUP_TREE) || exit 1
$(CMD_SED) -i '0,/^Version:.*$$/s//Version: $(TAG)/' builder/rpmBuild.spec
$(CMD_SED) -i '0,/^Release:.*$$/s//Release: $(RPM_RELEASE)/' builder/rpmBuild.spec
$(CMD_TAR) zcvf ~/rpmbuild/SOURCES/$(RPM_SOURCE0) ./
Expand Down Expand Up @@ -369,13 +371,13 @@ $(KERN_OBJECTS_NOCORE): %.nocore: %.c \
assets: \
.checkver_$(CMD_GO) \
ebpf
$(CMD_GO) run github.com/shuLhan/go-bindata/cmd/go-bindata -pkg assets -o "assets/ebpf_probe.go" $(wildcard ./user/bytecode/*.o)
$(CMD_GO) run github.com/shuLhan/go-bindata/cmd/go-bindata $(IGNORE_LESS52) -pkg assets -o "assets/ebpf_probe.go" $(wildcard ./user/bytecode/*.o)

.PHONY: assets_nocore
assets_nocore: \
.checkver_$(CMD_GO) \
ebpf_nocore
$(CMD_GO) run github.com/shuLhan/go-bindata/cmd/go-bindata -pkg assets -o "assets/ebpf_probe.go" $(wildcard ./user/bytecode/*.o)
$(CMD_GO) run github.com/shuLhan/go-bindata/cmd/go-bindata $(IGNORE_LESS52) -pkg assets -o "assets/ebpf_probe.go" $(wildcard ./user/bytecode/*.o)

.PHONY: build
build: \
Expand Down
4 changes: 2 additions & 2 deletions builder/Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PACKAGE_DESC = eCapture(旁观者): Capture SSL/TLS text content without a CA ce
PACKAGE_HOMEPAGE = https://ecapture.cc
PACKAGE_MAINTAINER = CFC4N <cfc4n.cs@gmail.com>
PACKAGE_VERSION ?= $(shell echo $(SNAPSHOT_VERSION) | $(CMD_SED) 's/v//g' )
OUT_DEB_FILE = $(OUTPUT_DIR)/$(PACKAGE_NAME)_$(SNAPSHOT_VERSION)_$(ARCH).deb
OUT_DEB_FILE = $(OUTPUT_DIR)/$(PACKAGE_NAME)_linux_$(SNAPSHOT_VERSION)_$(ARCH).deb

# 构建目录
BUILD_DIR = build
Expand All @@ -71,7 +71,7 @@ BUILD_DIR = build
#

OUT_ARCHIVE := $(OUTPUT_DIR)/$(TAR_DIR).tar.gz
OUT_ARCHIVE_ANDROID := $(OUTPUT_DIR)/$(TAR_DIR_ANDROID).tar.gz
OUT_ARCHIVE_ANDROID := $(OUTPUT_DIR)/$(TAR_DIR_ANDROID)-nocore.tar.gz
OUT_CHECKSUMS := $(OUTPUT_DIR)/checksum-$(SNAPSHOT_VERSION).txt


Expand Down

0 comments on commit 7e54d6b

Please sign in to comment.