Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/Makefile

    r1b1164e8 r1ea99cc  
    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 #
     1LIBC_PREFIX = ../../lib/libc
     2SOFTINT_PREFIX = ../../lib/softint
    293
    30 USPACE_PREFIX = ../..
    31 BINARY = tetris
     4include $(LIBC_PREFIX)/Makefile.toolchain
     5include $(LIBC_PREFIX)/Makefile.app
    326
    33 SOURCES = \
    34         shapes.c \
    35         scores.c \
    36         input.c \
    37         tetris.c \
    38         screen.c
     7OUTPUT = tetris
     8SOURCES = shapes.c scores.c input.c tetris.c screen.c
     9OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    3910
    40 include $(USPACE_PREFIX)/Makefile.common
     11.PHONY: all clean depend disasm
     12
     13all: $(OUTPUT) $(OUTPUT).disasm
     14
     15-include Makefile.depend
     16
     17depend:
     18        $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
     19
     20$(OUTPUT): $(OBJECTS) $(LIBS)
     21        $(LD) -T $(LD_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
     22
     23clean:
     24        -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o
     25
     26disasm: $(OUTPUT).disasm
     27
     28$(OUTPUT).disasm: $(OUTPUT)
     29        $(OBJDUMP) -d $< > $@
     30
     31%.o: %.S
     32        $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
     33
     34%.o: %.s
     35        $(AS) $(AFLAGS) $< -o $@
     36
     37%.o: %.c
     38        $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Note: See TracChangeset for help on using the changeset viewer.