Changeset b79d450 in mainline for uspace/app
- Timestamp:
- 2010-01-27T20:35:49Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fb6f1a5
- Parents:
- fccc236 (diff), 95e6c4f (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:
-
- 15 added
- 12 deleted
- 13 edited
- 2 moved
-
Makefile.common (moved) (moved from uspace/app/bdsh/Makefile.build ) (1 diff)
-
bdsh/Makefile (modified) (1 diff)
-
bdsh/cmds/modules/mkfile/entry.h (added)
-
bdsh/cmds/modules/mkfile/mkfile.c (added)
-
bdsh/cmds/modules/mkfile/mkfile.h (added)
-
bdsh/cmds/modules/mkfile/mkfile_def.h (added)
-
bdsh/cmds/modules/module_aliases.h (modified) (1 diff)
-
bdsh/cmds/modules/modules.h (modified) (4 diffs)
-
bdsh/cmds/modules/unmount/entry.h (added)
-
bdsh/cmds/modules/unmount/unmount.c (added)
-
bdsh/cmds/modules/unmount/unmount.h (added)
-
bdsh/cmds/modules/unmount/unmount_def.h (added)
-
edit/Makefile (modified) (1 diff)
-
edit/Makefile.build (deleted)
-
edit/edit.c (modified) (7 diffs)
-
getterm/Makefile (modified) (1 diff)
-
getterm/Makefile.build (deleted)
-
init/Makefile (modified) (1 diff)
-
init/Makefile.build (deleted)
-
init/init.c (modified) (3 diffs)
-
klog/Makefile (modified) (1 diff)
-
klog/Makefile.build (deleted)
-
mkfat/Makefile (moved) (moved from uspace/app/bdsh/Makefile.common ) (2 diffs)
-
mkfat/fat.h (added)
-
mkfat/mkfat.c (added)
-
redir/Makefile (modified) (1 diff)
-
redir/Makefile.build (deleted)
-
redir/Makefile.common (deleted)
-
taskdump/Makefile (added)
-
taskdump/include/elf.h (added)
-
taskdump/include/symtab.h (added)
-
taskdump/symtab.c (added)
-
taskdump/taskdump.c (added)
-
tester/Makefile (modified) (1 diff)
-
tester/Makefile.build (deleted)
-
tester/Makefile.common (deleted)
-
tetris/Makefile (modified) (1 diff)
-
tetris/Makefile.build (deleted)
-
tetris/Makefile.common (deleted)
-
trace/Makefile (modified) (1 diff)
-
trace/Makefile.build (deleted)
-
trace/Makefile.common (deleted)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/Makefile.common
rfccc236 rb79d450 28 28 # 29 29 30 ## Setup toolchain30 ## Common rules for building apps. 31 31 # 32 32 33 include Makefile.common 34 include $(LIBC_PREFIX)/Makefile.toolchain 35 36 CFLAGS += -I$(LIBBLOCK_PREFIX) -I. -Icmds/ -Icmds/builtins -Icmds/modules 37 38 ## Sources 33 # Individual makefiles set: 34 # 35 # USPACE_PREFIX relative path to uspace/ directory 36 # LIBS libraries to link with (with relative path) 37 # EXTRA_CFLAGS additional flags to pass to C compiler 38 # JOB job file name (like appname.job) 39 # OUTPUT output binary name (like appname) 40 # SOURCES list of source files 39 41 # 40 42 41 SOURCES = \ 42 cmds/modules/help/help.c \ 43 cmds/modules/mkdir/mkdir.c \ 44 cmds/modules/rm/rm.c \ 45 cmds/modules/bdd/bdd.c \ 46 cmds/modules/cat/cat.c \ 47 cmds/modules/touch/touch.c \ 48 cmds/modules/ls/ls.c \ 49 cmds/modules/pwd/pwd.c \ 50 cmds/modules/sleep/sleep.c \ 51 cmds/modules/cp/cp.c \ 52 cmds/modules/mv/mv.c \ 53 cmds/modules/mount/mount.c \ 54 cmds/modules/kcon/kcon.c \ 55 cmds/builtins/exit/exit.c \ 56 cmds/builtins/cd/cd.c \ 57 cmds/mod_cmds.c \ 58 cmds/builtin_cmds.c \ 59 errors.c \ 60 input.c \ 61 util.c \ 62 exec.c \ 63 scli.c 43 DEPEND = Makefile.depend 44 DEPEND_PREV = $(DEPEND).prev 45 46 LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc 47 LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock 48 SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint 49 50 JOB = $(OUTPUT).job 64 51 65 52 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 66 53 67 .PHONY: all 54 include $(LIBC_PREFIX)/Makefile.toolchain 68 55 69 all: $(OUTPUT) $(OUTPUT).disasm 56 CFLAGS += $(EXTRA_CFLAGS) 57 58 .PHONY: all build clean 59 60 all: \ 61 $(LIBC_PREFIX)/../../../version \ 62 $(LIBC_PREFIX)/../../../Makefile.config \ 63 $(LIBC_PREFIX)/../../../config.h \ 64 $(LIBC_PREFIX)/../../../config.defs \ 65 $(LIBS) \ 66 \ 67 $(OUTPUT) $(OUTPUT).disasm 68 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 69 70 clean: 71 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 72 find . -name '*.o' -follow -exec rm \{\} \; 73 74 build: 70 75 71 76 -include $(DEPEND) -
uspace/app/bdsh/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I. -Icmds/ -Icmds/builtins -Icmds/modules 31 33 32 .PHONY: all clean 34 OUTPUT = bdsh 33 35 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 PRECHECK=$(PRECHECK) 36 SOURCES = \ 37 cmds/modules/help/help.c \ 38 cmds/modules/mkdir/mkdir.c \ 39 cmds/modules/mkfile/mkfile.c \ 40 cmds/modules/rm/rm.c \ 41 cmds/modules/bdd/bdd.c \ 42 cmds/modules/cat/cat.c \ 43 cmds/modules/touch/touch.c \ 44 cmds/modules/ls/ls.c \ 45 cmds/modules/pwd/pwd.c \ 46 cmds/modules/sleep/sleep.c \ 47 cmds/modules/cp/cp.c \ 48 cmds/modules/mv/mv.c \ 49 cmds/modules/mount/mount.c \ 50 cmds/modules/unmount/unmount.c \ 51 cmds/modules/kcon/kcon.c \ 52 cmds/builtins/exit/exit.c \ 53 cmds/builtins/cd/cd.c \ 54 cmds/mod_cmds.c \ 55 cmds/builtin_cmds.c \ 56 errors.c \ 57 input.c \ 58 util.c \ 59 exec.c \ 60 scli.c 37 61 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 62 include ../Makefile.common -
uspace/app/bdsh/cmds/modules/module_aliases.h
rfccc236 rb79d450 14 14 char *mod_aliases[] = { 15 15 "ren", "mv", 16 "umount", "unmount", 16 17 NULL, NULL 17 18 }; -
uspace/app/bdsh/cmds/modules/modules.h
rfccc236 rb79d450 20 20 #include "help/entry.h" 21 21 #include "mkdir/entry.h" 22 #include "mkfile/entry.h" 22 23 #include "rm/entry.h" 23 24 #include "bdd/entry.h" … … 30 31 #include "mv/entry.h" 31 32 #include "mount/entry.h" 33 #include "unmount/entry.h" 32 34 #include "kcon/entry.h" 33 35 … … 39 41 #include "help/help_def.h" 40 42 #include "mkdir/mkdir_def.h" 43 #include "mkfile/mkfile_def.h" 41 44 #include "rm/rm_def.h" 42 45 #include "bdd/bdd_def.h" … … 49 52 #include "mv/mv_def.h" 50 53 #include "mount/mount_def.h" 54 #include "unmount/unmount_def.h" 51 55 #include "kcon/kcon_def.h" 52 56 -
uspace/app/edit/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = edit 33 34 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 PRECHECK=$(PRECHECK)35 SOURCES = \ 36 edit.c \ 37 sheet.c 37 38 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 39 include ../Makefile.common -
uspace/app/edit/edit.c
rfccc236 rb79d450 98 98 static bool done; 99 99 static pane_t pane; 100 static bool cursor_visible; 100 101 101 102 static int scr_rows, scr_columns; … … 108 109 /** Maximum filename length that can be entered. */ 109 110 #define INFNAME_MAX_LEN 128 111 112 static void cursor_show(void); 113 static void cursor_hide(void); 114 static void cursor_setvis(bool visible); 110 115 111 116 static void key_handle_unmod(console_event_t const *ev); … … 199 204 200 205 /* Initial display */ 206 cursor_visible = true; 207 208 cursor_hide(); 201 209 console_clear(con); 202 210 pane_text_display(); … … 205 213 status_display("File not found. Starting empty file."); 206 214 pane_caret_display(); 207 215 cursor_show(); 208 216 209 217 done = false; … … 230 238 /* Redraw as necessary. */ 231 239 240 cursor_hide(); 241 232 242 if (pane.rflags & REDRAW_TEXT) 233 243 pane_text_display(); … … 238 248 if (pane.rflags & REDRAW_CARET) 239 249 pane_caret_display(); 250 251 cursor_show(); 240 252 } 241 253 … … 243 255 244 256 return 0; 257 } 258 259 static void cursor_show(void) 260 { 261 cursor_setvis(true); 262 } 263 264 static void cursor_hide(void) 265 { 266 cursor_setvis(false); 267 } 268 269 static void cursor_setvis(bool visible) 270 { 271 if (cursor_visible != visible) { 272 console_cursor_visibility(con, visible); 273 cursor_visible = visible; 274 } 245 275 } 246 276 -
uspace/app/getterm/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 include ../../../version 31 DEFS += -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" 31 32 32 .PHONY: all clean 33 USPACE_PREFIX = ../.. 34 LIBS = $(LIBC_PREFIX)/libc.a 33 35 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 PRECHECK=$(PRECHECK) 36 OUTPUT = getterm 37 37 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 38 SOURCES = \ 39 getterm.c \ 40 version.c 41 42 include ../Makefile.common -
uspace/app/init/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = init 33 34 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 PRECHECK=$(PRECHECK) 35 SOURCES = \ 36 init.c 37 37 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 38 include ../Makefile.common -
uspace/app/init/init.c
rfccc236 rb79d450 233 233 } 234 234 235 static void mount_scratch(void) 236 { 237 int rc; 238 239 printf("Trying to mount null/0 on /scratch... "); 240 fflush(stdout); 241 242 rc = mount("tmpfs", "/scratch", "null/0", "", 0); 243 if (rc == EOK) 244 printf("OK\n"); 245 else 246 printf("Failed\n"); 247 } 248 235 249 static void mount_data(void) 236 250 { … … 255 269 return -1; 256 270 } 271 272 /* Make sure tmpfs is running. */ 273 if (str_cmp(STRING(RDFMT), "tmpfs") != 0) { 274 spawn("/srv/tmpfs"); 275 } 257 276 258 277 spawn("/srv/devfs"); 278 spawn("/srv/taskmon"); 259 279 260 280 if (!mount_devfs()) { … … 262 282 return -2; 263 283 } 284 285 mount_scratch(); 264 286 265 287 spawn("/srv/fhc"); -
uspace/app/klog/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = klog 33 34 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 PRECHECK=$(PRECHECK) 35 SOURCES = \ 36 klog.c 37 37 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 38 include ../Makefile.common -
uspace/app/mkfat/Makefile
rfccc236 rb79d450 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 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) 29 33 30 ## Common names 31 # 34 OUTPUT = mkfat 32 35 33 LIBC_PREFIX = ../../lib/libc 34 SOFTINT_PREFIX = ../../lib/softint 35 LIBBLOCK_PREFIX = ../../lib/libblock 36 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a 36 SOURCES = \ 37 mkfat.c 37 38 38 DEPEND = Makefile.depend 39 DEPEND_PREV = $(DEPEND).prev 40 JOB = bdsh.job 41 OUTPUT = bdsh 39 include ../Makefile.common -
uspace/app/redir/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = redir 33 34 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 PRECHECK=$(PRECHECK) 35 SOURCES = \ 36 redir.c 37 37 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 38 include ../Makefile.common -
uspace/app/tester/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = tester 33 34 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 PRECHECK=$(PRECHECK) 35 SOURCES = \ 36 tester.c \ 37 thread/thread1.c \ 38 print/print1.c \ 39 print/print2.c \ 40 print/print3.c \ 41 print/print4.c \ 42 console/console1.c \ 43 stdio/stdio1.c \ 44 stdio/stdio2.c \ 45 fault/fault1.c \ 46 fault/fault2.c \ 47 fault/fault3.c \ 48 vfs/vfs1.c \ 49 ipc/ping_pong.c \ 50 ipc/register.c \ 51 ipc/connect.c \ 52 loop/loop1.c \ 53 mm/malloc1.c 37 54 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 55 include ../Makefile.common -
uspace/app/tetris/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = tetris 33 34 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 PRECHECK=$(PRECHECK) 35 SOURCES = \ 36 shapes.c \ 37 scores.c \ 38 input.c \ 39 tetris.c \ 40 screen.c 37 41 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 42 include ../Makefile.common -
uspace/app/trace/Makefile
rfccc236 rb79d450 28 28 # 29 29 30 include Makefile.common 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBC_PREFIX)/libc.a 31 32 32 .PHONY: all clean 33 OUTPUT = trace 33 34 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 PRECHECK=$(PRECHECK) 35 SOURCES = \ 36 trace.c \ 37 syscalls.c \ 38 ipcp.c \ 39 ipc_desc.c \ 40 proto.c \ 41 errors.c 37 42 38 clean: 39 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm 40 find . -name '*.o' -follow -exec rm \{\} \; 43 include ../Makefile.common
Note:
See TracChangeset
for help on using the changeset viewer.
