Changeset b79d450 in mainline for uspace/app


Ignore:
Timestamp:
2010-01-27T20:35:49Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
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.
Message:

Merge mainline changes.

Location:
uspace/app
Files:
15 added
12 deleted
13 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/Makefile.common

    rfccc236 rb79d450  
    2828#
    2929
    30 ## Setup toolchain
     30## Common rules for building apps.
    3131#
    3232
    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
    3941#
    4042
    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
     43DEPEND = Makefile.depend
     44DEPEND_PREV = $(DEPEND).prev
     45
     46LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
     47LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock
     48SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
     49
     50JOB = $(OUTPUT).job
    6451
    6552OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    6653
    67 .PHONY: all
     54include $(LIBC_PREFIX)/Makefile.toolchain
    6855
    69 all: $(OUTPUT) $(OUTPUT).disasm
     56CFLAGS += $(EXTRA_CFLAGS)
     57
     58.PHONY: all build clean
     59
     60all: \
     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
     70clean:
     71        rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
     72        find . -name '*.o' -follow -exec rm \{\} \;
     73
     74build:
    7075
    7176-include $(DEPEND)
  • uspace/app/bdsh/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a
     32EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I. -Icmds/ -Icmds/builtins -Icmds/modules
    3133
    32 .PHONY: all clean
     34OUTPUT = bdsh
    3335
    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)
     36SOURCES = \
     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
    3761
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     62include ../Makefile.common
  • uspace/app/bdsh/cmds/modules/module_aliases.h

    rfccc236 rb79d450  
    1414char *mod_aliases[] = {
    1515        "ren", "mv",
     16        "umount", "unmount",
    1617        NULL, NULL
    1718};
  • uspace/app/bdsh/cmds/modules/modules.h

    rfccc236 rb79d450  
    2020#include "help/entry.h"
    2121#include "mkdir/entry.h"
     22#include "mkfile/entry.h"
    2223#include "rm/entry.h"
    2324#include "bdd/entry.h"
     
    3031#include "mv/entry.h"
    3132#include "mount/entry.h"
     33#include "unmount/entry.h"
    3234#include "kcon/entry.h"
    3335
     
    3941#include "help/help_def.h"
    4042#include "mkdir/mkdir_def.h"
     43#include "mkfile/mkfile_def.h"
    4144#include "rm/rm_def.h"
    4245#include "bdd/bdd_def.h"
     
    4952#include "mv/mv_def.h"
    5053#include "mount/mount_def.h"
     54#include "unmount/unmount_def.h"
    5155#include "kcon/kcon_def.h"
    5256
  • uspace/app/edit/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = edit
    3334
    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)
     35SOURCES = \
     36        edit.c \
     37        sheet.c
    3738
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     39include ../Makefile.common
  • uspace/app/edit/edit.c

    rfccc236 rb79d450  
    9898static bool done;
    9999static pane_t pane;
     100static bool cursor_visible;
    100101
    101102static int scr_rows, scr_columns;
     
    108109/** Maximum filename length that can be entered. */
    109110#define INFNAME_MAX_LEN 128
     111
     112static void cursor_show(void);
     113static void cursor_hide(void);
     114static void cursor_setvis(bool visible);
    110115
    111116static void key_handle_unmod(console_event_t const *ev);
     
    199204
    200205        /* Initial display */
     206        cursor_visible = true;
     207
     208        cursor_hide();
    201209        console_clear(con);
    202210        pane_text_display();
     
    205213                status_display("File not found. Starting empty file.");
    206214        pane_caret_display();
    207 
     215        cursor_show();
    208216
    209217        done = false;
     
    230238                /* Redraw as necessary. */
    231239
     240                cursor_hide();
     241
    232242                if (pane.rflags & REDRAW_TEXT)
    233243                        pane_text_display();
     
    238248                if (pane.rflags & REDRAW_CARET)
    239249                        pane_caret_display();
     250
     251                cursor_show();
    240252        }
    241253
     
    243255
    244256        return 0;
     257}
     258
     259static void cursor_show(void)
     260{
     261        cursor_setvis(true);
     262}
     263
     264static void cursor_hide(void)
     265{
     266        cursor_setvis(false);
     267}
     268
     269static void cursor_setvis(bool visible)
     270{
     271        if (cursor_visible != visible) {
     272                console_cursor_visibility(con, visible);
     273                cursor_visible = visible;
     274        }
    245275}
    246276
  • uspace/app/getterm/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30include ../../../version
     31DEFS += -DRELEASE=$(RELEASE) "-DNAME=$(NAME)"
    3132
    32 .PHONY: all clean
     33USPACE_PREFIX = ../..
     34LIBS = $(LIBC_PREFIX)/libc.a
    3335
    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)
     36OUTPUT = getterm
    3737
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     38SOURCES = \
     39        getterm.c \
     40        version.c
     41
     42include ../Makefile.common
  • uspace/app/init/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = init
    3334
    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)
     35SOURCES = \
     36        init.c
    3737
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     38include ../Makefile.common
  • uspace/app/init/init.c

    rfccc236 rb79d450  
    233233}
    234234
     235static 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
    235249static void mount_data(void)
    236250{
     
    255269                return -1;
    256270        }
     271
     272        /* Make sure tmpfs is running. */
     273        if (str_cmp(STRING(RDFMT), "tmpfs") != 0) {
     274                spawn("/srv/tmpfs");
     275        }
    257276       
    258277        spawn("/srv/devfs");
     278        spawn("/srv/taskmon");
    259279       
    260280        if (!mount_devfs()) {
     
    262282                return -2;
    263283        }
     284
     285        mount_scratch();
    264286       
    265287        spawn("/srv/fhc");
  • uspace/app/klog/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = klog
    3334
    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)
     35SOURCES = \
     36        klog.c
    3737
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     38include ../Makefile.common
  • uspace/app/mkfat/Makefile

    rfccc236 rb79d450  
    11#
    22# Copyright (c) 2005 Martin Decky
     3# Copyright (c) 2007 Jakub Jermar
    34# All rights reserved.
    45#
     
    2728#
    2829
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a
     32EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX)
    2933
    30 ## Common names
    31 #
     34OUTPUT = mkfat
    3235
    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
     36SOURCES = \
     37        mkfat.c
    3738
    38 DEPEND = Makefile.depend
    39 DEPEND_PREV = $(DEPEND).prev
    40 JOB = bdsh.job
    41 OUTPUT = bdsh
     39include ../Makefile.common
  • uspace/app/redir/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = redir
    3334
    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)
     35SOURCES = \
     36        redir.c
    3737
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     38include ../Makefile.common
  • uspace/app/tester/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = tester
    3334
    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)
     35SOURCES = \
     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
    3754
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     55include ../Makefile.common
  • uspace/app/tetris/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = tetris
    3334
    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)
     35SOURCES = \
     36        shapes.c \
     37        scores.c \
     38        input.c \
     39        tetris.c \
     40        screen.c
    3741
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     42include ../Makefile.common
  • uspace/app/trace/Makefile

    rfccc236 rb79d450  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = trace
    3334
    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)
     35SOURCES = \
     36        trace.c \
     37        syscalls.c \
     38        ipcp.c \
     39        ipc_desc.c \
     40        proto.c \
     41        errors.c
    3742
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
    40         find . -name '*.o' -follow -exec rm \{\} \;
     43include ../Makefile.common
Note: See TracChangeset for help on using the changeset viewer.