Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions GPR/plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ LD = g++
CXXFLAGS = -O3 -Wall -Wall -Wextra -pedantic -fPIC -Wno-unused-parameter -std=c++14
# Dependency-generation flags
DEPFLAGS = -MMD -MP
# Linker flags OS dependent
ifeq ($(OS),Windows_NT)
LDFLAGS = -shared -Wl,-Bstatic -lntdll -lKERNEL32 -lmsvcrt -lCRYPTBASE -lucrtbase
else
# Linker flags
LDFLAGS = -shared
endif


# Build directories
BUILD_DIR=build
Expand All @@ -42,8 +37,13 @@ DEPSDIR := $(addprefix $(BUILD_DIR)/, $(DEPS))

all: $(BUILD_DIR) $(BUILD_DIR)/$(TARGET)

ifeq ($(OS),Windows_NT)
$(BUILD_DIR)/$(TARGET): $(OBJSDIR)
$(LD) $(LDFLAGS) -o $@ $^ -static-libstdc++ -static-libgcc -static -pthread
else
$(BUILD_DIR)/$(TARGET): $(OBJSDIR)
$(LD) $(LDFLAGS) -o $@ $^
$(LD) $(LDFLAGS) -o $@ $^ -static-libstdc++ -static-libgcc
endif

$(BUILD_DIR)/%.o: %.cpp
$(CC) $(CXXFLAGS) $(DEPFLAGS) $(INCLUDES) -c $< -o $@
Expand Down