Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 827d73f in mainline for uspace/app/Makefile.common


Ignore:
Timestamp:
2010-02-12T14:09:22Z (12 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master
Children:
a70bda4
Parents:
918e9910 (diff), e70edd1 (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 the actual head

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/Makefile.common

    r918e9910 r827d73f  
    2828#
    2929
    30 ## Setup toolchain
     30## Common rules for building apps.
    3131#
    3232
    33 include Makefile.common
    34 include $(LIBC_PREFIX)/Makefile.toolchain
    35 include ../../../version
    36 
    37 DEFS += -DRELEASE=$(RELEASE) "-DNAME=$(NAME)"
    38 
    39 ## 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
    4041#
    4142
    42 SOURCES = \
    43         getterm.c \
    44         version.c
     43DEPEND = Makefile.depend
     44DEPEND_PREV = $(DEPEND).prev
     45
     46LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
     47LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock
     48SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
     49
     50JOB = $(OUTPUT).job
    4551
    4652OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    4753
    48 .PHONY: all
     54include $(LIBC_PREFIX)/Makefile.toolchain
    4955
    50 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:
    5175
    5276-include $(DEPEND)
     
    6084%.o: %.c $(DEPEND)
    6185        $(CC) $(DEFS) $(CFLAGS) -c $< -o $@
     86ifeq ($(PRECHECK),y)
     87        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
     88endif
    6289
    6390$(DEPEND):
Note: See TracChangeset for help on using the changeset viewer.