Changeset 1787e527 in mainline for uspace/app
- Timestamp:
- 2009-11-16T21:22:54Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ebdf94
- Parents:
- fcbd1be (diff), 9c70ed6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/app
- Files:
-
- 24 added
- 15 edited
-
bdsh/Makefile (modified) (1 diff)
-
bdsh/Makefile.build (added)
-
bdsh/Makefile.common (added)
-
bdsh/cmds/modules/bdd/bdd.c (modified) (6 diffs)
-
bdsh/scli.c (modified) (1 diff)
-
bdsh/scli.h (modified) (1 diff)
-
edit/Makefile (added)
-
edit/Makefile.build (added)
-
edit/Makefile.common (added)
-
edit/edit.c (added)
-
edit/sheet.c (added)
-
edit/sheet.h (added)
-
getvc/Makefile (modified) (2 diffs)
-
getvc/Makefile.build (added)
-
getvc/Makefile.common (added)
-
getvc/getvc.c (modified) (4 diffs)
-
init/Makefile (modified) (2 diffs)
-
init/Makefile.build (added)
-
init/Makefile.common (added)
-
init/init.c (modified) (1 diff)
-
klog/Makefile (modified) (2 diffs)
-
klog/Makefile.build (added)
-
klog/Makefile.common (added)
-
klog/klog.c (modified) (1 diff)
-
redir/Makefile (added)
-
redir/Makefile.build (added)
-
redir/Makefile.common (added)
-
redir/redir.c (added)
-
tester/Makefile (modified) (2 diffs)
-
tester/Makefile.build (added)
-
tester/Makefile.common (added)
-
tetris/Makefile (modified) (1 diff)
-
tetris/Makefile.build (added)
-
tetris/Makefile.common (added)
-
tetris/screen.h (modified) (1 diff)
-
trace/Makefile (modified) (2 diffs)
-
trace/Makefile.build (added)
-
trace/Makefile.common (added)
-
trace/syscalls.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/Makefile
rfcbd1be r1787e527 1 # Copyright (c) 2005, Martin Decky2 # All rights reserved.3 # Copyright (c) 200 8, Tim Post <tinkertim@gmail.com>1 # 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 4 4 # All rights reserved. 5 5 # 6 6 # Redistribution and use in source and binary forms, with or without 7 # modification, are permitted provided that the following conditions are met: 7 # modification, are permitted provided that the following conditions 8 # are met: 8 9 # 9 # Redistributions of source code must retain the above copyright notice, this 10 # list of conditions and the following disclaimer. 10 # - Redistributions of source code must retain the above copyright 11 # notice, this list of conditions and the following disclaimer. 12 # - Redistributions in binary form must reproduce the above copyright 13 # notice, this list of conditions and the following disclaimer in the 14 # documentation and/or other materials provided with the distribution. 15 # - The name of the author may not be used to endorse or promote products 16 # derived from this software without specific prior written permission. 11 17 # 12 # Redistributions in binary form must reproduce the above copyright notice, 13 # this list of conditions and the following disclaimer in the documentation 14 # and/or other materials provided with the distribution. 18 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 28 # 16 # Neither the name of the original program's authors nor the names of its17 # contributors may be used to endorse or promote products derived from this18 # software without specific prior written permission.19 #20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE24 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR25 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF26 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS27 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN28 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)29 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE30 # POSSIBILITY OF SUCH DAMAGE.31 29 32 include ../../../version30 include Makefile.common 33 31 34 LIBC_PREFIX = ../../lib/libc 35 SOFTINT_PREFIX = ../../lib/softint 36 LIBBLOCK_PREFIX = ../../lib/libblock 32 .PHONY: all clean 37 33 38 include $(LIBC_PREFIX)/Makefile.toolchain 39 40 CFLAGS += -I../../srv/kbd/include -I$(LIBBLOCK_PREFIX) 41 42 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a 43 DEFS += -DRELEASE=$(RELEASE) 44 45 PROGRAM = bdsh 46 47 # Any directory that cleaning targets should know about 48 SUBDIRS = \ 49 ./ \ 50 cmds/ \ 51 cmds/modules/ \ 52 cmds/modules/help/ \ 53 cmds/modules/mkdir/ \ 54 cmds/modules/rm/ \ 55 cmds/modules/bdd/ \ 56 cmds/modules/cat/ \ 57 cmds/modules/touch/ \ 58 cmds/modules/ls/ \ 59 cmds/modules/pwd/ \ 60 cmds/modules/sleep/ \ 61 cmds/modules/cp/ \ 62 cmds/modules/mv/ \ 63 cmds/modules/mount/ \ 64 cmds/modules/kcon/ \ 65 cmds/builtins/ \ 66 cmds/builtins/exit/\ 67 cmds/builtins/cd/ 68 69 SOURCES = \ 70 cmds/modules/help/help.c \ 71 cmds/modules/mkdir/mkdir.c \ 72 cmds/modules/rm/rm.c \ 73 cmds/modules/bdd/bdd.c \ 74 cmds/modules/cat/cat.c \ 75 cmds/modules/touch/touch.c \ 76 cmds/modules/ls/ls.c \ 77 cmds/modules/pwd/pwd.c \ 78 cmds/modules/sleep/sleep.c \ 79 cmds/modules/cp/cp.c \ 80 cmds/modules/mv/mv.c \ 81 cmds/modules/mount/mount.c \ 82 cmds/modules/kcon/kcon.c \ 83 cmds/builtins/exit/exit.c \ 84 cmds/builtins/cd/cd.c \ 85 cmds/mod_cmds.c \ 86 cmds/builtin_cmds.c \ 87 errors.c \ 88 input.c \ 89 util.c \ 90 exec.c \ 91 scli.c 92 93 CFLAGS += -I. -Icmds/ -Icmds/builtins -Icmds/modules 94 95 OBJECTS = $(SOURCES:.c=.o) 96 97 # For easy cleaning, *.o is already handled 98 CLEANDIRS := $(addsuffix *~,$(SUBDIRS)) 99 CLEANDIRS += $(addsuffix *.bak,$(SUBDIRS)) 100 CLEANDIRS += $(addsuffix *.tmp,$(SUBDIRS)) 101 CLEANDIRS += $(addsuffix *.out,$(SUBDIRS)) 102 CLEANDIRS += $(addsuffix *.d,$(SUBDIRS)) 103 CLEANDIRS += $(addsuffix *.gch,$(SUBDIRS) ) 104 105 %.o: %.S 106 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 107 108 %.o: %.s 109 $(AS) $(AFLAGS) $< -o $@ 110 111 %.o: %.c 112 $(CC) $(CFLAGS) $(INC) -c $< -o $@ 113 @$(CC) -M $(CFLAGS) $(INC) $*.c > $*.d 114 115 $(PROGRAM): $(OBJECTS) $(LIBS) 116 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(PROGRAM).map 117 118 # Everything else is a phony target 119 .PHONY: all clean distclean depend disasm 120 121 all: $(PROGRAM) disasm 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 122 37 123 38 clean: 124 @-rm -f $(OBJECTS) 125 @-rm -f $(PROGRAM) 126 @-rm -f $(PROGRAM).map 127 @-rm -f $(PROGRAM).disasm 128 @-rm -f $(CLEANDIRS) 129 130 depend: 131 @echo '' 132 133 disasm: 134 $(OBJDUMP) -d $(PROGRAM) >$(PROGRAM).disasm 135 136 distclean: clean 137 138 # Do not delete - dependencies 139 -include $(OBJECTS:.o=.d) 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/bdsh/cmds/modules/bdd/bdd.c
rfcbd1be r1787e527 40 40 #include <devmap.h> 41 41 #include <errno.h> 42 #include <assert.h> 42 43 43 #define BLOCK_SIZE 512 44 #define BPR 16 44 enum { 45 /* Number of bytes per row */ 46 BPR = 16 47 }; 45 48 46 49 static const char *cmdname = "bdd"; … … 66 69 unsigned int i, j; 67 70 dev_handle_t handle; 68 block_t *block;69 71 uint8_t *blk; 70 72 size_t size, bytes, rows; 73 size_t block_size; 71 74 int rc; 72 bn_t b off;75 bn_t ba; 73 76 uint8_t b; 74 77 … … 82 85 83 86 if (argc >= 3) 84 b off= strtol(argv[2], NULL, 0);87 ba = strtol(argv[2], NULL, 0); 85 88 else 86 b off= 0;89 ba = 0; 87 90 88 91 if (argc >= 4) … … 93 96 rc = devmap_device_get_handle(argv[1], &handle, 0); 94 97 if (rc != EOK) { 95 printf(" Error: could not resolve device `%s'.\n", argv[1]);98 printf("%s: Error resolving device `%s'.\n", cmdname, argv[1]); 96 99 return CMD_FAILURE; 97 100 } 98 101 99 rc = block_init(handle, BLOCK_SIZE);102 rc = block_init(handle, 2048); 100 103 if (rc != EOK) { 101 printf(" Error: could not init libblock.\n");104 printf("%s: Error initializing libblock.\n", cmdname); 102 105 return CMD_FAILURE; 103 106 } 104 107 105 rc = block_ cache_init(handle, BLOCK_SIZE, 2, CACHE_MODE_WB);108 rc = block_get_bsize(handle, &block_size); 106 109 if (rc != EOK) { 107 printf("Error: could not init block cache.\n"); 110 printf("%s: Error determining device block size.\n", cmdname); 111 return CMD_FAILURE; 112 } 113 114 blk = malloc(block_size); 115 if (blk == NULL) { 116 printf("%s: Error allocating memory.\n", cmdname); 117 block_fini(handle); 108 118 return CMD_FAILURE; 109 119 } 110 120 111 121 while (size > 0) { 112 block = block_get(handle, boff, 0); 113 blk = (uint8_t *) block->data; 122 rc = block_read_direct(handle, ba, 1, blk); 123 if (rc != EOK) { 124 printf("%s: Error reading block %llu\n", cmdname, ba); 125 free(blk); 126 block_fini(handle); 127 return CMD_FAILURE; 128 } 114 129 115 bytes = (size < BLOCK_SIZE) ? size : BLOCK_SIZE;130 bytes = (size < block_size) ? size : block_size; 116 131 rows = (bytes + BPR - 1) / BPR; 117 132 … … 139 154 } 140 155 141 block_put(block);142 143 156 if (size > rows * BPR) 144 157 size -= rows * BPR; … … 146 159 size = 0; 147 160 148 boff += rows * BPR; 161 /* Next block */ 162 ba += 1; 149 163 } 150 164 165 free(blk); 151 166 block_fini(handle); 152 167 -
uspace/app/bdsh/scli.c
rfcbd1be r1787e527 61 61 usr->line = (char *) NULL; 62 62 usr->name = "root"; 63 usr->home = "/";64 63 usr->cwd = (char *) NULL; 65 64 usr->prompt = (char *) NULL; 66 chdir(usr->home);67 65 usr->lasterr = 0; 68 66 return (int) cli_set_prompt(usr); -
uspace/app/bdsh/scli.h
rfcbd1be r1787e527 7 7 typedef struct { 8 8 char *name; 9 char *home;10 9 char *line; 11 10 char *cwd; -
uspace/app/getvc/Makefile
rfcbd1be r1787e527 1 1 # 2 # Copyright (c) 2009 Martin Decky 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 include ../../../version30 include Makefile.common 30 31 31 ## Setup toolchain 32 # 32 .PHONY: all clean 33 33 34 LIBC_PREFIX = ../../lib/libc 35 SOFTINT_PREFIX = ../../lib/softint 36 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 DEFS += -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" 41 42 ## Sources 43 # 44 45 OUTPUT = getvc 46 SOURCES = \ 47 getvc.c \ 48 version.c 49 50 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 51 52 .PHONY: all clean depend disasm 53 54 all: $(OUTPUT) $(OUTPUT).disasm 55 56 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../version $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 57 37 58 38 clean: 59 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 60 61 depend: 62 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 63 64 $(OUTPUT): $(OBJECTS) $(LIBS) 65 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 66 67 disasm: $(OUTPUT).disasm 68 69 $(OUTPUT).disasm: $(OUTPUT) 70 $(OBJDUMP) -d $< > $@ 71 72 %.o: %.S 73 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 74 75 %.o: %.s 76 $(AS) $(AFLAGS) $< -o $@ 77 78 %.o: %.c 79 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/getvc/getvc.c
rfcbd1be r1787e527 36 36 37 37 #include <sys/types.h> 38 #include <fcntl.h> 38 39 #include <unistd.h> 39 40 #include <stdio.h> … … 46 47 } 47 48 48 static void closeall(void)49 static void reopen(FILE **stream, int fd, const char *path, int flags, const char *mode) 49 50 { 50 fclose(stdin); 51 fclose(stdout); 52 fclose(stderr); 51 if (fclose(*stream)) 52 return; 53 53 54 close(0); 55 close(1); 56 close(2); 54 *stream = NULL; 55 56 int oldfd = open(path, flags); 57 if (oldfd < 0) 58 return; 59 60 if (oldfd != fd) { 61 if (dup2(oldfd, fd) != fd) 62 return; 63 64 if (close(oldfd)) 65 return; 66 } 67 68 *stream = fdopen(fd, mode); 57 69 } 58 70 59 71 static task_id_t spawn(char *fname) 60 72 { 61 char *arg v[2];73 char *args[2]; 62 74 63 arg v[0] = fname;64 arg v[1] = NULL;75 args[0] = fname; 76 args[1] = NULL; 65 77 66 task_id_t id = task_spawn(fname, arg v);78 task_id_t id = task_spawn(fname, args); 67 79 68 80 if (id == 0) … … 74 86 int main(int argc, char *argv[]) 75 87 { 76 task_exit_t texit;77 int retval;78 79 88 if (argc < 3) { 80 89 usage(); … … 82 91 } 83 92 84 closeall(); 93 reopen(&stdin, 0, argv[1], O_RDONLY, "r"); 94 reopen(&stdout, 1, argv[1], O_WRONLY, "w"); 95 reopen(&stderr, 2, argv[1], O_WRONLY, "w"); 85 96 86 stdin = fopen(argv[1], "r");87 stdout = fopen(argv[1], "w");88 stderr = fopen(argv[1], "w");89 90 97 /* 91 * FIXME: f open() should actually detect that we are opening a console98 * FIXME: fdopen() should actually detect that we are opening a console 92 99 * and it should set line-buffering mode automatically. 93 100 */ 94 101 setvbuf(stdout, NULL, _IOLBF, BUFSIZ); 95 102 96 if ((stdin == NULL) 97 || (stdout == NULL) 98 || (stderr == NULL)) 103 if (stdin == NULL) 99 104 return -2; 105 106 if (stdout == NULL) 107 return -3; 108 109 if (stderr == NULL) 110 return -4; 100 111 101 112 version_print(argv[1]); 102 113 task_id_t id = spawn(argv[2]); 103 task_wait(id, &texit, &retval);104 114 105 return 0; 115 if (id != 0) { 116 task_exit_t texit; 117 int retval; 118 task_wait(id, &texit, &retval); 119 120 return 0; 121 } 122 123 return -5; 106 124 } 107 125 -
uspace/app/init/Makefile
rfcbd1be r1787e527 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../.. 38 LIBS = $(LIBC_PREFIX)/libc.a 39 40 ## Sources 41 # 42 43 OUTPUT = init 44 SOURCES = \ 45 init.c 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend disasm 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 disasm: $(OUTPUT).disasm 65 66 $(OUTPUT).disasm: $(OUTPUT) 67 $(OBJDUMP) -d $< > $@ 68 69 %.o: %.S 70 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 71 72 %.o: %.s 73 $(AS) $(AFLAGS) $< -o $@ 74 75 %.o: %.c 76 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/init/init.c
rfcbd1be r1787e527 48 48 #include <string.h> 49 49 #include <devmap.h> 50 #include <config.h>51 50 #include "init.h" 52 51 -
uspace/app/klog/Makefile
rfcbd1be r1787e527 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 LIBS = $(LIBC_PREFIX)/libc.a 38 39 ## Sources 40 # 41 42 OUTPUT = klog 43 SOURCES = \ 44 klog.c 45 46 47 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 48 49 .PHONY: all clean depend disasm 50 51 all: $(OUTPUT) $(OUTPUT).disasm 52 53 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 54 37 55 38 clean: 56 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 57 58 depend: 59 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 60 61 $(OUTPUT): $(OBJECTS) $(LIBS) 62 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 63 64 disasm: $(OUTPUT).disasm 65 66 $(OUTPUT).disasm: $(OUTPUT) 67 $(OBJDUMP) -d $< > $@ 68 69 %.o: %.S 70 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 71 72 %.o: %.s 73 $(AS) $(AFLAGS) $< -o $@ 74 75 %.o: %.c 76 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/klog/klog.c
rfcbd1be r1787e527 74 74 } 75 75 76 int res = ipc_share_in_start_1_0(PHONE_NS, (void *) klog,76 int res = async_share_in_start_1_0(PHONE_NS, (void *) klog, 77 77 klog_size, SERVICE_MEM_KLOG); 78 78 if (res != EOK) { -
uspace/app/tester/Makefile
rfcbd1be r1787e527 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../srv/kbd/include 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 41 ## Sources 42 # 43 44 OUTPUT = tester 45 SOURCES = tester.c \ 46 thread/thread1.c \ 47 print/print1.c \ 48 print/print2.c \ 49 print/print3.c \ 50 print/print4.c \ 51 console/console1.c \ 52 stdio/stdio1.c \ 53 stdio/stdio2.c \ 54 fault/fault1.c \ 55 fault/fault2.c \ 56 vfs/vfs1.c \ 57 ipc/ping_pong.c \ 58 ipc/register.c \ 59 ipc/connect.c \ 60 loop/loop1.c \ 61 mm/malloc1.c 62 63 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 64 65 .PHONY: all clean depend disasm 66 67 all: $(OUTPUT) $(OUTPUT).disasm 68 69 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 70 37 71 38 clean: 72 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) 73 74 depend: 75 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 76 77 $(OUTPUT): $(OBJECTS) $(LIBS) 78 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 79 80 disasm: $(OUTPUT).disasm 81 82 $(OUTPUT).disasm: $(OUTPUT) 83 $(OBJDUMP) -d $< > $@ 84 85 %.o: %.S 86 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 87 88 %.o: %.s 89 $(AS) $(AFLAGS) $< -o $@ 90 91 %.o: %.c 92 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/tetris/Makefile
rfcbd1be r1787e527 1 LIBC_PREFIX = ../../lib/libc 2 SOFTINT_PREFIX = ../../lib/softint 1 # 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 4 # All rights reserved. 5 # 6 # Redistribution and use in source and binary forms, with or without 7 # modification, are permitted provided that the following conditions 8 # are met: 9 # 10 # - Redistributions of source code must retain the above copyright 11 # notice, this list of conditions and the following disclaimer. 12 # - Redistributions in binary form must reproduce the above copyright 13 # notice, this list of conditions and the following disclaimer in the 14 # documentation and/or other materials provided with the distribution. 15 # - The name of the author may not be used to endorse or promote products 16 # derived from this software without specific prior written permission. 17 # 18 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # 3 29 4 include $(LIBC_PREFIX)/Makefile.toolchain30 include Makefile.common 5 31 6 LIBS = $(LIBC_PREFIX)/libc.a 32 .PHONY: all clean 7 33 8 OUTPUT = tetris 9 SOURCES = shapes.c scores.c input.c tetris.c screen.c 10 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 11 12 .PHONY: all clean depend disasm 13 14 all: $(OUTPUT) $(OUTPUT).disasm 15 16 -include Makefile.depend 17 18 depend: 19 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 20 21 $(OUTPUT): $(OBJECTS) $(LIBS) 22 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 23 37 24 38 clean: 25 -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o 26 27 disasm: $(OUTPUT).disasm 28 29 $(OUTPUT).disasm: $(OUTPUT) 30 $(OBJDUMP) -d $< > $@ 31 32 %.o: %.S 33 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 34 35 %.o: %.s 36 $(AS) $(AFLAGS) $< -o $@ 37 38 %.o: %.c 39 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/tetris/screen.h
rfcbd1be r1787e527 51 51 52 52 typedef struct { 53 i pcarg_t ws_row;54 i pcarg_t ws_col;53 int ws_row; 54 int ws_col; 55 55 } winsize_t; 56 56 -
uspace/app/trace/Makefile
rfcbd1be r1787e527 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 4 # All rights reserved. 4 5 # … … 27 28 # 28 29 29 ## Setup toolchain 30 # 30 include Makefile.common 31 31 32 LIBC_PREFIX = ../../lib/libc 33 SOFTINT_PREFIX = ../../lib/softint 32 .PHONY: all clean 34 33 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 37 CFLAGS += -I../../srv/kbd/include 38 39 LIBS = $(LIBC_PREFIX)/libc.a 40 41 ## Sources 42 # 43 44 OUTPUT = trace 45 SOURCES = trace.c \ 46 syscalls.c \ 47 ipcp.c \ 48 ipc_desc.c \ 49 proto.c \ 50 errors.c 51 52 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 53 54 .PHONY: all clean depend disasm 55 56 all: $(OUTPUT) disasm 57 58 -include Makefile.depend 34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS) 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 $(MAKE) -f Makefile.build 59 37 60 38 clean: 61 -rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend 62 63 depend: 64 $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend 65 66 $(OUTPUT): $(OBJECTS) $(LIBS) 67 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 68 69 disasm: 70 $(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm 71 72 %.o: %.S 73 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 74 75 %.o: %.s 76 $(AS) $(AFLAGS) $< -o $@ 77 78 %.o: %.c 79 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 39 rm -f $(DEPEND) $(DEPEND_PREV) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; -
uspace/app/trace/syscalls.c
rfcbd1be r1787e527 62 62 [SYS_IPC_FORWARD_SLOW] = { "ipc_forward_slow", 3, V_ERRNO }, 63 63 [SYS_IPC_WAIT] = { "ipc_wait_for_call", 3, V_HASH }, 64 [SYS_IPC_POKE] = { "ipc_poke", 0, V_ERRNO }, 64 65 [SYS_IPC_HANGUP] = { "ipc_hangup", 1, V_ERRNO }, 65 66 [SYS_IPC_REGISTER_IRQ] = { "ipc_register_irq", 4, V_ERRNO },
Note:
See TracChangeset
for help on using the changeset viewer.
