forked from megastep/mysql-udf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (44 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Where to copy the final library
#DEST = ./plugin
# Where are mysql libraries
INCL = -I/usr/src/mariadb-5.5.30/include/ -I/usr/include/mysql
TARGET = udf_math.so
CFLAGS = -O2 -fPIC $(INCL) -DHAVE_DLOPEN=1
SRCS = udf_colwidth.cc \
udf_confidence_higher.cc \
udf_confidence_lower.cc \
udf_correlation.cc \
udf_faculty.cc \
udf_geomean.cc \
udf_intercept.cc \
udf_kurtosis.cc \
udf_longest.cc \
udf_median.cc \
udf_noverm.cc \
udf_skewness.cc \
udf_slope.cc \
udf_stdnorm_density.cc \
udf_stdnorm_dist.cc \
udf_steyx.cc \
udf_weightedavg.cc \
udf_realvalformax.cc \
udf_strvalformax.cc \
udf_strvalformin.cc \
udf_realvalfordatemax.cc \
udf_realvalfordatemin.cc \
udf_realvalformin.cc
OBJS = $(SRCS:%.cc=%.o)
all: $(TARGET)
install: $(TARGET)
@echo
@echo "To install the udf functions,"
@echo "copy $(TARGET) to mysql/plugins directory,"
@echo "then run the SQL file import.sql in MySQL"
@echo
# cp $(TARGET) $(DEST)
clean:
$(RM) $(OBJS) $(TARGET)
%.o: %.cc
$(CXX) -o $@ $(CFLAGS) -c $<
$(TARGET): $(OBJS)
$(LD) -shared -o $(TARGET) $(OBJS)