Changeset 5a4fef9 in mainline for uspace/app/bdsh/Makefile


Ignore:
Timestamp:
2009-11-16T21:24:28Z (14 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18baf9c0
Parents:
5f678b1c (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.
Message:

merged head changes to this branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/Makefile

    r5f678b1c r5a4fef9  
    1 # Copyright (c) 2005,  Martin Decky
    2 # All rights reserved.
    3 # Copyright (c) 2008, Tim Post <tinkertim@gmail.com>
     1#
     2# Copyright (c) 2005 Martin Decky
     3# Copyright (c) 2007 Jakub Jermar
    44# All rights reserved.
    55#
    66# 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:
    89#
    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.
    1117#
    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.
    1528#
    16 # Neither the name of the original program's authors nor the names of its
    17 # contributors may be used to endorse or promote products derived from this
    18 # 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, THE
    22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    23 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    24 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    25 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    26 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    27 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    28 # 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 THE
    30 # POSSIBILITY OF SUCH DAMAGE.
    3129
    32 include ../../../version
     30include Makefile.common
    3331
    34 LIBC_PREFIX = ../../lib/libc
    35 SOFTINT_PREFIX = ../../lib/softint
    36 LIBBLOCK_PREFIX = ../../lib/libblock
     32.PHONY: all clean
    3733
    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
    120 
    121 all: $(PROGRAM) $(PROGRAM).disasm
     34all: $(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
    12237
    12338clean:
    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 $(PROGRAM).disasm: $(PROGRAM)
    134         $(OBJDUMP) -d $< > $@
    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 \{\} \;
Note: See TracChangeset for help on using the changeset viewer.