Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/klog/Makefile

    r1b1164e8 r1ea99cc  
    11#
    22# Copyright (c) 2005 Martin Decky
    3 # Copyright (c) 2007 Jakub Jermar
    43# All rights reserved.
    54#
     
    2827#
    2928
    30 USPACE_PREFIX = ../..
    31 BINARY = klog
     29## Setup toolchain
     30#
    3231
     32LIBC_PREFIX = ../../lib/libc
     33SOFTINT_PREFIX = ../../lib/softint
     34
     35include $(LIBC_PREFIX)/Makefile.toolchain
     36include $(LIBC_PREFIX)/Makefile.app
     37
     38## Sources
     39#
     40
     41OUTPUT = klog
    3342SOURCES = \
    3443        klog.c
    3544
    36 include $(USPACE_PREFIX)/Makefile.common
     45
     46OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
     47
     48.PHONY: all clean depend disasm
     49
     50all: $(OUTPUT) $(OUTPUT).disasm
     51
     52-include Makefile.depend
     53
     54clean:
     55        -rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS)
     56
     57depend:
     58        $(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
     59
     60$(OUTPUT): $(OBJECTS) $(LIBS)
     61        $(LD) -T $(LD_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
     62
     63disasm: $(OUTPUT).disasm
     64
     65$(OUTPUT).disasm: $(OUTPUT)
     66        $(OBJDUMP) -d $< > $@
     67
     68%.o: %.S
     69        $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
     70
     71%.o: %.s
     72        $(AS) $(AFLAGS) $< -o $@
     73
     74%.o: %.c
     75        $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Note: See TracChangeset for help on using the changeset viewer.