Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimized udf build #5391

Merged
merged 4 commits into from
Mar 9, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: enable make with udf name as argument
example: make UDF=standard_deviation
  • Loading branch information
wey-gu authored Mar 8, 2023
commit 9700704617e8c07ef9aa4bb48d381bfea013eeee
11 changes: 9 additions & 2 deletions udf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ endif
CXX := g++
CXX_FLAGS := -c -I ../src/ -I $(3PP_PATH)/include/ -fPIC

UDF ?= standard_deviation

all: standard_deviation.cpp
$(CXX) $(CXX_FLAGS) standard_deviation.cpp -o standard_deviation.o
$(CXX) -shared -o standard_deviation.so standard_deviation.o
$(CXX) $(CXX_FLAGS) $(UDF).cpp -o $(UDF).o
$(CXX) -shared -o $(UDF).so $(UDF).o

clean:
rm ./*.o
rm ./*.so

.PHONY: help
help:
@echo "Usage: make UDF=<udf_name>"
@echo "Example: make UDF=standard_deviation"