File tree 20 files changed +451
-125
lines changed
20 files changed +451
-125
lines changed Original file line number Diff line number Diff line change 29
29
- ngdevkit-gngeo
30
30
- python3-pygame
31
31
- imagemagick
32
+ - sox
33
+ - libsox-fmt-mp3
32
34
- libglew-dev
33
35
- libsdl2-dev
34
36
env :
47
49
# ngdevkit-examples deps
48
50
- ngdevkit-gngeo
49
51
- imagemagick
52
+ - sox
50
53
- glew
51
54
- sdl2
52
55
- sdl2_image
Original file line number Diff line number Diff line change 15
15
# along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
16
16
17
17
OBJS =libsyscalls.a ngdevkit-crt0.o
18
+ SYSCALL_OBJS =\
19
+ close \
20
+ _exit \
21
+ exit \
22
+ fstat \
23
+ getpid \
24
+ gettimeofday \
25
+ isatty \
26
+ kill \
27
+ link \
28
+ lseek \
29
+ open \
30
+ raise \
31
+ read \
32
+ sbrk \
33
+ times \
34
+ unlink \
35
+ write
36
+
18
37
19
38
all : $(OBJS ) ngdevkit-specs
20
39
21
40
-include ../Makefile.config
22
41
23
- libsyscalls.a : syscalls.o
24
- $(NGAR ) cru $@ $^ && $(NGRANLIB ) $@
42
+ libsyscalls.a : $( SYSCALL_OBJS:%=syscall/%.o )
43
+ $(NGAR ) cru $@ $^ && $(NGRANLIB ) $@
25
44
26
45
ngdevkit-specs :
27
46
$(NGGCC ) -dumpspecs | sed -e ' s/\(-lc\)/\1 -lsyscalls/' | \
@@ -49,6 +68,6 @@ install-specs: install-dirs ngdevkit-specs
49
68
$(INSTALL ) $(filter-out install-dirs,$^ ) $$ DIR
50
69
51
70
clean :
52
- rm -f * .o * ~ * .a ngdevkit-specs
71
+ rm -f * .o syscall/ * .o * ~ * .a ngdevkit-specs
53
72
54
73
.PHONY : install clean
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ void _exit (int x ) {
21
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <errno.h>
21
+
22
+
23
+ int close (int file ) {
24
+ errno = EBADF ;
25
+ return -1 ;
26
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+
21
+ void exit (int n ) {
22
+ for (;;);
23
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <sys/types.h>
21
+ #include <sys/stat.h>
22
+ #include <unistd.h>
23
+ #include <errno.h>
24
+
25
+
26
+ int fstat (int file , struct stat * st ) {
27
+ errno = EBADF ;
28
+ return -1 ;
29
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+
21
+ int getpid (int n ) {
22
+ return 1 ;
23
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <errno.h>
21
+
22
+
23
+ int gettimeofday (void * tp , void * tzp ) {
24
+ errno = EINVAL ;
25
+ return -1 ;
26
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ int isatty (int fd ) {
21
+ return 0 ;
22
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <sys/types.h>
21
+ #include <signal.h>
22
+ #include <errno.h>
23
+
24
+
25
+ int kill (int n , int m ) {
26
+ errno = EINVAL ;
27
+ return -1 ;
28
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <errno.h>
21
+
22
+
23
+ int link (void ) {
24
+ errno = ENOENT ;
25
+ return -1 ;
26
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <errno.h>
21
+
22
+
23
+ int lseek (int file , int ptr , int dir ) {
24
+ errno = EBADF ;
25
+ return -1 ;
26
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <errno.h>
21
+
22
+
23
+ int open (const char * path , int flags , ... ) {
24
+ errno = EMFILE ;
25
+ return -1 ;
26
+ }
Original file line number Diff line number Diff line change
1
+ void raise (void ) {
2
+ return ;
3
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Syscall implementation as expected by newlib
3
+ * Copyright (c) 2015-2020 Damien Ciabrini
4
+ * This file is part of ngdevkit
5
+ *
6
+ * ngdevkit is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as
8
+ * published by the Free Software Foundation, either version 3 of the
9
+ * License, or (at your option) any later version.
10
+ *
11
+ * ngdevkit is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with ngdevkit. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ #include <errno.h>
21
+
22
+
23
+ int read (int file , char * ptr , int len ) {
24
+ errno = EBADF ;
25
+ return -1 ;
26
+ }
You can’t perform that action at this time.
0 commit comments