Changeset 3b3e776 in mainline for uspace/app/Makefile.common


Ignore:
Timestamp:
2010-02-05T10:57:50Z (16 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0358da0
Parents:
3f085132 (diff), b4cbef1 (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 with head

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/Makefile.common

    r3f085132 r3b3e776  
    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 ## 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
    3741#
    3842
    39 SOURCES = \
    40         main.c \
    41         pic.c \
    42         pci.c \
    43         intel_piix3.c \
    44         isa.c \
    45         serial.c
     43DEPEND = Makefile.depend
     44DEPEND_PREV = $(DEPEND).prev
    4645
    47 ifeq ($(PROCESSOR), us)
    48         SOURCES += psycho.c
    49 endif
     46LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
     47LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock
     48SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
    5049
    51 ifeq ($(UARCH), ia32)
    52         SOURCES += intel_method1.c
    53 endif
    54 
     50JOB = $(OUTPUT).job
    5551
    5652OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    5753
    58 .PHONY: all
     54include $(LIBC_PREFIX)/Makefile.toolchain
    5955
    60 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:
    6175
    6276-include $(DEPEND)
     
    7084%.o: %.c $(DEPEND)
    7185        $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
     86ifeq ($(PRECHECK),y)
     87        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
     88endif
    7289
    7390$(DEPEND):
Note: See TracChangeset for help on using the changeset viewer.