Skip to content

Commit

Permalink
recode makefile for static link all & some MCU unsupport pie;
Browse files Browse the repository at this point in the history
  • Loading branch information
housisong committed Jul 28, 2024
1 parent 4c752d8 commit ddd8788
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ ARM64ASM := 0
# lzma only can used software CRC? (no hardware CRC)
USE_CRC_EMU := 0
# supported atomic uint64?
ATOMIC_U64 := 1
# 0: not need zstd; 1: compile zstd source code; 2: used -lzstd to link zstd lib;
ZSTD := 1
MD5 := 1
STATIC_CPP := 0
# used clang?
CL := 0
# build with -m32?
Expand Down Expand Up @@ -56,6 +54,13 @@ else
endif
endif

STATIC_CPP := 0
STATIC_C := 0
# -1: no pie; 0: default;
PIE :=0
ATOMIC_U64 := 1


HDIFF_OBJ :=
HPATCH_OBJ := \
libHDiffPatch/HPatch/patch.o \
Expand Down Expand Up @@ -368,6 +373,13 @@ ifeq ($(MT),0)
else
PATCH_LINK += -lpthread # link pthread
endif
ifeq ($(PIE),-1)
PATCH_LINK += -no-pie
endif
ifeq ($(STATIC_C),0)
else
PATCH_LINK += -static
endif
DIFF_LINK := $(PATCH_LINK)
ifeq ($(M32),0)
else
Expand All @@ -387,6 +399,7 @@ else
DIFF_LINK += -static-libstdc++
endif


CFLAGS += $(DEF_FLAGS)
CXXFLAGS += $(DEF_FLAGS) -std=c++11

Expand Down

0 comments on commit ddd8788

Please sign in to comment.