-
Notifications
You must be signed in to change notification settings - Fork 159
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
Make it possible to build GAP as a dynamic library #1205
Changes from all commits
090c88d
5b6572f
e235cd1
de41f91
63970fc
0d3c782
452fc05
2a33824
920cd46
eeec674
a6a688f
5c688f5
d51848d
bac8e83
fd6954e
e562f06
11cce5e
a0076c3
a0ac524
cb8a7a8
3e20453
29712b0
b145760
7ff4fb1
6176b97
d56dc1d
106fa37
69e6e78
2b8df14
609a492
4eb2440
01021eb
65fbb55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ | |
# Default rule: build gap | ||
######################################################################## | ||
all: gap$(EXEEXT) gac | ||
.PHONY: all | ||
|
||
libgap: libgap.la | ||
.PHONY: libgap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This duplicates what is already there in the lines below. |
||
|
||
libgap: libgap.la | ||
.PHONY: libgap | ||
|
@@ -21,7 +23,6 @@ libgap: libgap.la | |
default: all | ||
.PHONY: default | ||
|
||
|
||
######################################################################## | ||
# Source files | ||
# | ||
|
@@ -118,6 +119,9 @@ ifeq ($(HPCGAP),yes) | |
SOURCES += src/hpc/traverse.c | ||
endif | ||
|
||
ifeq ($(BUILD_LIBGAP),yes) | ||
SOURCES += src/sage_interface.c | ||
endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, perhaps distinguish between |
||
|
||
######################################################################## | ||
# Preprocessor flags | ||
|
@@ -1022,3 +1026,13 @@ doc/make_doc: $(srcdir)/doc/make_doc.in config.status | |
|
||
gac: $(srcdir)/cnf/gac.in config.status | ||
$(SHELL) ./config.status $@ | ||
|
||
# TODO: This needs to be done more elegantly | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You probably plan to clean this up before the PR is merged. But if not, then this comment needs to be expanded, to explain what "this" is and what the TODO is. |
||
obj/libgap-test-0001.lo: $(top_srcdir)/tst/testlibgap/0001.c | ||
$(QUIET_CC)$(COMPILE) $(DEPFLAGS) $(GAP_CFLAGS) $(CC_EXTRA_FLAGS) $(GAP_CPPFLAGS) -c $< -o $@ | ||
|
||
test-libgap: libgap.la obj/libgap-test-0001.lo | ||
$(QUIET_LINK)$(LINK) obj/libgap-test-0001.lo libgap.la -o test-libgap | ||
./test-libgap -l $(top_srcdir) -m 32m -q -T > 0001.out | ||
diff $(top_srcdir)/tst/testlibgap/0001.expect 0001.out | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,6 +201,11 @@ extern void ErrorReturnVoid ( | |
Int arg2, | ||
const Char * msg2 ); | ||
|
||
typedef void (* TJumpToCatchFunc)(); | ||
extern TJumpToCatchFunc JumpToCatchFunc; | ||
static inline void SetJumpToCatchFunc(TJumpToCatchFunc func) | ||
{ JumpToCatchFunc = func; }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That an odd code formatting style... Also, why does this setter even exist, if |
||
|
||
/* TL: extern Obj ErrorLVars; | ||
TL: extern Obj ErrorLVars0; | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1153,6 +1153,7 @@ typedef Bag * (* TNumAllocFuncBags) ( | |
UInt need ); | ||
|
||
typedef void (* TNumStackFuncBags) ( void ); | ||
typedef void (* TExtraMarkFuncBags) (void); | ||
|
||
typedef void (* TNumAbortFuncBags) ( | ||
const Char * msg ); | ||
|
@@ -1163,6 +1164,7 @@ extern void InitBags ( | |
TNumStackFuncBags stack_func, | ||
Bag * stack_bottom, | ||
UInt stack_align, | ||
UInt dirty, | ||
TNumAbortFuncBags abort_func ); | ||
|
||
/**************************************************************************** | ||
|
@@ -1190,4 +1192,14 @@ extern void CallbackForAllBags( | |
void *AllocateMemoryBlock(UInt size); | ||
#endif | ||
|
||
/* | ||
* If not 0 this function will be called in | ||
* CollectBags to allow users of libgap to mark bags | ||
*/ | ||
extern TExtraMarkFuncBags ExtraMarkFuncBags; | ||
|
||
static void SetExtraMarkFuncBags(TExtraMarkFuncBags func) | ||
{ ExtraMarkFuncBags = func; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above: Odd non-GAPish code formatting; and what's the point of a setter if wee don't hide the global variable anyway? |
||
|
||
|
||
#endif // GAP_GASMAN_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this line removed?