Skip to content

Commit 430844b

Browse files
authored
feat: optimized udf build (#5391)
* fix udf build The indent character was wrong, now it's fixed and tested. * ignore .o files * feat: enable make with udf name as argument example: make UDF=standard_deviation
1 parent 8f800e4 commit 430844b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

udf/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.o

udf/Makefile

+11-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@ endif
1616
CXX := g++
1717
CXX_FLAGS := -c -I ../src/ -I $(3PP_PATH)/include/ -fPIC
1818

19+
UDF ?= standard_deviation
20+
1921
all: standard_deviation.cpp
20-
$(CXX) $(CXX_FLAGS) standard_deviation.cpp -o standard_deviation.o
21-
$(CXX) -shared -o standard_deviation.so standard_deviation.o
22+
$(CXX) $(CXX_FLAGS) $(UDF).cpp -o $(UDF).o
23+
$(CXX) -shared -o $(UDF).so $(UDF).o
2224

2325
clean:
24-
rm ./*.o
25-
rm ./*.so
26+
rm ./*.o
27+
rm ./*.so
28+
29+
.PHONY: help
30+
help:
31+
@echo "Usage: make UDF=<udf_name>"
32+
@echo "Example: make UDF=standard_deviation"

0 commit comments

Comments
 (0)