File tree Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Original file line number Diff line number Diff line change
1
+ CC := gcc
2
+ RM := rm
3
+ CD := cd
4
+ MAKE := make
5
+
6
+ CFLAGS += -Wall -Wextra -fpic -O2 -fno-strict-aliasing -Wno-unused-parameter
7
+
8
+
9
+ SYS := $(shell gcc -dumpmachine)
10
+
11
+ ifeq ($(SYS ) , x86_64-w64-mingw32)
12
+ BUILDSYS := $(SYS)
13
+ else
14
+ BUILDSYS := $(shell bash $(LIBFFI_PATH)/config.guess)
15
+ endif
16
+
17
+ ifneq (, $(findstring linux, $(SYS ) ) )
18
+ SUFFIX := so
19
+ LDFLAGS := -shared
20
+ LIBS += -ldl
21
+ else ifneq (, $(findstring mingw, $(SYS)))
22
+ SUFFIX := dll
23
+ LDFLAGS := -shared
24
+ else
25
+ $(error Unsupported build platform)
26
+ endif
27
+
28
+
29
+
30
+
31
+ ifndef GLOBALS_HOME
32
+ $(error Couldn't find GLOBALS_HOME)
33
+ endif
34
+
35
+ ifndef PYTHONHOME
36
+ $(error Couldn't find PYTHONHOME)
37
+ endif
38
+
39
+ PYTHONVER := $(shell ${PYTHONHOME}python -c "import sys; print(sys.version_info[0],sys.version_info[1],sep='') ")
40
+ LIBS = -lpython${PYTHONVER}
41
+
42
+ LDFLAGS += -L${PYTHONHOME}/Libs
43
+
44
+ INCLUDES += -I${GLOBALS_HOME}/dev/cpp/include
45
+ INCLUDES += -I${PYTHONHOME}/include
46
+ CFLAGS += $(INCLUDES )
47
+
48
+ .PHONY : all clean
49
+
50
+ all : iscpython.$(SUFFIX )
51
+
52
+ iscpython.o : iscpython.c
53
+
54
+ iscpython.$(SUFFIX ) : iscpython.o
55
+ $(CC ) $(LDFLAGS ) -o $@ $^ $(LIBS )
56
+
57
+ clean :
58
+ $(RM ) * .$(SUFFIX ) * .o
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
/// Main callout wrapper.
2
2
/// To use:
3
- /// 1. Call: write ##class(isc.py.Callout).Setup() once per systems start
3
+ /// 1. Call: do ##class(isc.py.Callout).Setup() once per systems start
4
4
/// 2. Call: do ##class(isc.py.Callout).Initialize() once per process
5
5
/// 3. Call main method (can be called many times, context persists): write ##class(isc.py.Callout).SimpleString(code, data)
6
6
/// 4. Call: do ##class(isc.py.Callout).Finalize() to free Python context
@@ -22,7 +22,7 @@ Parameter SimpleStringFull As Integer = 5;
22
22
23
23
Parameter SimpleString As Integer = 6 ;
24
24
25
- Parameter DLL As COSEXPRESSION = " $g(^isc.py.Callout, $g(^%SYS(" " bindir" " )) _ " " libhelloworld .dll" " )" ;
25
+ Parameter DLL As COSEXPRESSION = " $g(^isc.py.Callout, $g(^%SYS(" " bindir" " )) _ " " iscpython .dll" " )" ;
26
26
27
27
/// Should be executed once per system start. Idempotent.
28
28
/// Add to ZSTART or production start.
You can’t perform that action at this time.
0 commit comments