-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,175 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,7 @@ duktape-2.5.0/djgpp/ | |
*.d | ||
dzcomm/obj/djgpp/asmdef.s | ||
doc/ | ||
dexport.c | ||
*.dxe | ||
jSH-cppcheck-build-dir/ | ||
*.undef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ The documentation states: | |
|
||
MIT License | ||
|
||
Copyright (c) 2019-2020 Andre Seidelt <[email protected]> | ||
Copyright (c) 2019-2021 Andre Seidelt <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
all: $(DXE_NAME) check_exports | ||
|
||
clean distclean: | ||
rm -rf *.dxe *.d *.o *.undef | ||
|
||
%.o: %.c | ||
$(CC) -o $@ -c $(CFLAGS) $< | ||
|
||
%.dxe: %.o | ||
$(DXE3GEN) -o $@ $< $(DXE_LDFLAGS) -U -E _init_ -E _shutdown_ -V | tee $(basename $@).undef | sort | ||
cp $@ .. | ||
|
||
check_exports: $(DXE_NAME) ../$(DXE_TEMPLATE) | ||
python3 ../check_exports.py ../$(DXE_TEMPLATE) $(basename $<).undef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import sys | ||
import re | ||
|
||
if len(sys.argv) < 2: | ||
print("Usage:\n {} <template> <undef file>".format(sys.argv[0])) | ||
exit(1) | ||
|
||
fd = re.compile(r"unresolved: `_(\w*)'") | ||
|
||
had_errors = False | ||
|
||
with open(sys.argv[1], "r") as template: | ||
with open(sys.argv[2], "r") as undeffile: | ||
|
||
# create a set with available exports | ||
exports = [] | ||
for l in template: | ||
l = l.strip() | ||
if not l.startswith("//") and not l.startswith("#") and len(l) > 0: | ||
exports.append(l) | ||
available = set(exports) | ||
|
||
# check if all symbols exist | ||
for l in undeffile: | ||
res = fd.search(l) | ||
if res: | ||
func = res.group(1) | ||
if not func.startswith("js_"): | ||
if func not in exports: | ||
had_errors = True | ||
print("WARNING: DXE export '{}' missing!".format(func)) | ||
|
||
# fail if there were missing symbols | ||
if had_errors: | ||
print("\n\n!!! DXE export check FAILED!\n\n") | ||
exit(1) | ||
else: | ||
print("DXE export check OK!") | ||
exit(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DXE_LDFLAGS = -L../$(DZCOMMDIR)/lib/djgpp -ldzcom | ||
DXE_NAME = comport.dxe | ||
|
||
include ../Makefile.dxemk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
MIT License | ||
Copyright (c) 2019-2020 Andre Seidelt <[email protected]> | ||
Copyright (c) 2019-2021 Andre Seidelt <[email protected]> | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
MIT License | ||
Copyright (c) 2019-2020 Andre Seidelt <[email protected]> | ||
Copyright (c) 2019-2021 Andre Seidelt <[email protected]> | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.