1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,21 @@ |
1 |
+MIT License |
|
2 |
+ |
|
3 |
+Copyright (c) Devine Lu Linvega |
|
4 |
+ |
|
5 |
+Permission is hereby granted, free of charge, to any person obtaining a copy |
|
6 |
+of this software and associated documentation files (the "Software"), to deal |
|
7 |
+in the Software without restriction, including without limitation the rights |
|
8 |
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
9 |
+copies of the Software, and to permit persons to whom the Software is |
|
10 |
+furnished to do so, subject to the following conditions: |
|
11 |
+ |
|
12 |
+The above copyright notice and this permission notice shall be included in all |
|
13 |
+copies or substantial portions of the Software. |
|
14 |
+ |
|
15 |
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
16 |
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
17 |
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
18 |
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
19 |
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
20 |
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
21 |
+SOFTWARE. |
0 | 10 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,26 @@ |
1 |
+#!/bin/bash |
|
2 |
+ |
|
3 |
+# format code |
|
4 |
+clang-format -i uxn.c |
|
5 |
+ |
|
6 |
+# remove old |
|
7 |
+rm -f ./uxn |
|
8 |
+ |
|
9 |
+# debug(slow) |
|
10 |
+cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined uxn.c -o uxn |
|
11 |
+ |
|
12 |
+# build(fast) |
|
13 |
+# cc uxn.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o uxn |
|
14 |
+ |
|
15 |
+# Size |
|
16 |
+echo "Size: $(du -sk ./uxn)" |
|
17 |
+ |
|
18 |
+# Install |
|
19 |
+if [ -d "$HOME/bin" ] && [ -e ./uxn ] |
|
20 |
+then |
|
21 |
+ cp ./uxn $HOME/bin |
|
22 |
+ echo "Installed: $HOME/bin" |
|
23 |
+fi |
|
24 |
+ |
|
25 |
+# run |
|
26 |
+./uxn |
0 | 27 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
1 |
+#include <stdio.h> |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+Copyright (c) 2021 Devine Lu Linvega |
|
5 |
+ |
|
6 |
+Permission to use, copy, modify, and distribute this software for any |
|
7 |
+purpose with or without fee is hereby granted, provided that the above |
|
8 |
+copyright notice and this permission notice appear in all copies. |
|
9 |
+ |
|
10 |
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
11 |
+WITH REGARD TO THIS SOFTWARE. |
|
12 |
+*/ |
|
13 |
+ |
|
14 |
+int |
|
15 |
+main(int argc, char *argv[]) |
|
16 |
+{ |
|
17 |
+ printf("hello\n"); |
|
18 |
+ return 0; |
|
19 |
+} |