Check-in [77f0f6ca06]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:simplified makefile and removed an old assert
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 77f0f6ca0649a5e74932c72f2e050d252c20d301245cd1108816d2f65bfef312
User & Date: grable 2018-11-02 18:50:02.385
Context
2018-11-03
01:15
added some support functions for struct jimff_typeinfo, and some more error conditions to jimff_import_symbol() check-in: 68b67b4789 user: grable tags: trunk
2018-11-02
18:50
simplified makefile and removed an old assert check-in: 77f0f6ca06 user: grable tags: trunk
16:36
set varacces to disabled as default check-in: 3fde67ba9a user: grable tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to 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

CC = gcc
CFLAGS = -m32 -std=gnu11
INCLUDE = -Ic:/BlitzMax/mod/grb.mod/jimtcl.mod/jimtcl -Ic:/BlitzMax/mod/grb.mod/ffcall.mod/ffcall/include
LIB = -Lc:/BlitzMax/mod/grb.mod/ffcall.mod/ffcall/lib
LIBJIM = c:/BlitzMax/mod/grb.mod/jimtcl.mod/jimtcl/libjim.dll
LIBS = -l:libffcall.dll.a

JIMFF_H = jimff.h jimff-dlib.h jimff-list.h
JIMFF_C = jimff.c \
				jimff-call.c jimff-set.c \
				jimff-commands.c \
				jimff-library.c jimff-callback.c jimff-pointer.c \
				jimff-static-pointer.c jimff-dynamic-pointer.c \
				strrpbrk.c

all: jimff.so test_lib.dll


jimff.so: $(JIMFF_H) $(JIMFF_C)
	$(CC) $(CFLAGS) $(INCLUDE) -Ofast -DNDEBUG -w $(LIB) $(LIBJIM) -shared -DJIMFF_DLL jimff.c $(LIBS) -o jimff.so



debug: $(JIMFF_H) $(JIMFF_C) tests/test_lib.c
	$(CC) $(CFLAGS) $(INCLUDE) -Og -g $(LIB) $(LIBJIM) -shared -DJIMFF_DLL jimff.c $(LIBS) -o jimff.so
	$(CC) $(CFLAGS) -Og -g -shared tests/test_lib.c -o test_lib.dll

test_lib.dll: tests/test_lib.c
	$(CC) $(CFLAGS) -Os -s -DNDEBUG -shared tests/test_lib.c -o test_lib.dll

jimff_test.exe: jimff.bmx tests/jimff_test.bmx
	bmk makeapp -r -t console -o jimff_test.exe tests/jimff_test.bmx

test: jimff.so test_lib.dll jimff_test.exe
ifneq (,$(wildcard jimff_test.tcl))
	jimsh jimff_test.tcl
else
	jimsh tests/jimff_init.tcl
endif
	
clean:
	rm -rf test_lib.dll jimff.so jimff_test.exe





|












>
|
|
>
>

|
|
<


|




|





|


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

CC = gcc
CFLAGS = -m32 -std=gnu11
INCLUDE = -Ic:/BlitzMax/mod/grb.mod/jimtcl.mod/jimtcl -Ic:/BlitzMax/mod/grb.mod/ffcall.mod/ffcall/include
LIB = -Lc:/BlitzMax/mod/grb.mod/ffcall.mod/ffcall/lib
LIBJIM = c:/BlitzMax/mod/grb.mod/jimtcl.mod/jimtcl/libjim.dll -DJIM_EXPORT="__declspec(dllimport)"
LIBS = -l:libffcall.dll.a

JIMFF_H = jimff.h jimff-dlib.h jimff-list.h
JIMFF_C = jimff.c \
				jimff-call.c jimff-set.c \
				jimff-commands.c \
				jimff-library.c jimff-callback.c jimff-pointer.c \
				jimff-static-pointer.c jimff-dynamic-pointer.c \
				strrpbrk.c

all: jimff.so test_lib.dll

release: CFLAGS+=-DNDEBUG -Ofast -s
release: jimff.so

debug: CFLAGS+=-Og -g
debug: jimff.so test_lib.dll

jimff.so: $(JIMFF_H) $(JIMFF_C)
	$(CC) $(CFLAGS) $(INCLUDE) -w $(LIB) $(LIBJIM) -shared -DJIMFF_DLL jimff.c $(LIBS) -o jimff.so


test_lib.dll: tests/test_lib.c
	$(CC) $(CFLAGS) -shared tests/test_lib.c -o test_lib.dll

jimff_test.exe: jimff.bmx tests/jimff_test.bmx
	bmk makeapp -r -t console -o jimff_test.exe tests/jimff_test.bmx

test: jimff.so test_lib.dll
ifneq (,$(wildcard jimff_test.tcl))
	jimsh jimff_test.tcl
else
	jimsh tests/jimff_init.tcl
endif

clean:
	rm -rf test_lib.dll jimff.so jimff_test.exe
Changes to jimff.c.
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
		}
	}
}

JIMFF_API struct jimff_symbol* jimff_import_symbol( struct jimff_library* lib, int tag, const char* name, const char* alias, union jimff_argument argument) {
	assert( lib && lib->handle );
	assert( name );
	assert( alias );
	
	struct jimff_symbol* link = NULL;
	struct jimff_symbol* sym;
	int returntype;
	void* addr;
	int size = 0;
	struct jimff_typeinfo typeinfo = {0};







<







387
388
389
390
391
392
393

394
395
396
397
398
399
400
		}
	}
}

JIMFF_API struct jimff_symbol* jimff_import_symbol( struct jimff_library* lib, int tag, const char* name, const char* alias, union jimff_argument argument) {
	assert( lib && lib->handle );
	assert( name );

	
	struct jimff_symbol* link = NULL;
	struct jimff_symbol* sym;
	int returntype;
	void* addr;
	int size = 0;
	struct jimff_typeinfo typeinfo = {0};