Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/Makefile

    ra4885a42 rcc1f8d4  
    11#
    22# Copyright (c) 2005 Martin Decky
     3# Copyright (c) 2007 Jakub Jermar
    34# All rights reserved.
    45#
     
    2728#
    2829
    29 ## Setup toolchain
    30 #
     30include Makefile.common
    3131
    32 LIBC_PREFIX = ../../lib/libc
    33 SOFTINT_PREFIX = ../../lib/softint
     32.PHONY: all clean
    3433
    35 include $(LIBC_PREFIX)/Makefile.toolchain
    36 
    37 CFLAGS += -I.
    38 
    39 LIBS = $(LIBC_PREFIX)/libc.a
    40 
    41 ## Sources
    42 #
    43 
    44 OUTPUT = console
    45 
    46 GENERIC_SOURCES = \
    47         console.c \
    48         screenbuffer.c \
    49         keybuffer.c \
    50         gcons.c
    51 
    52 IMAGES = \
    53         gfx/helenos.ppm \
    54         gfx/nameic.ppm \
    55         gfx/cons_selected.ppm \
    56         gfx/cons_idle.ppm \
    57         gfx/cons_has_data.ppm \
    58         gfx/cons_kernel.ppm \
    59         gfx/anim_1.ppm \
    60         gfx/anim_2.ppm \
    61         gfx/anim_3.ppm \
    62         gfx/anim_4.ppm
    63 
    64 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \
    65         $(addsuffix .o,$(basename $(IMAGES)))
    66 
    67 OBJECTS := $(GENERIC_OBJECTS)
    68 
    69 .PHONY: all clean depend disasm
    70 
    71 all: $(OUTPUT) $(OUTPUT).disasm
    72 
    73 -include Makefile.depend
     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
    7437
    7538clean:
    76         -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS)
    77 
    78 depend:
    79         $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
    80 
    81 $(OUTPUT): $(OBJECTS) $(LIBS)
    82         $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
    83 
    84 disasm: $(OUTPUT).disasm
    85 
    86 $(OUTPUT).disasm: $(OUTPUT)
    87         $(OBJDUMP) -d $< > $@
    88 
    89 %.o: %.S
    90         $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
    91 
    92 %.o: %.s
    93         $(AS) $(AFLAGS) $< -o $@
    94 
    95 %.o: %.c
    96         $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
    97 
    98 %.o: %.ppm
    99         $(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) $< $@
     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.