Changeset e5773c6 in mainline for uspace/srv/Makefile.common


Ignore:
Timestamp:
2010-01-15T22:13:12Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
15eeb93
Parents:
5edb1f5
Message:

Extract common makefile part for apps and servers, use for all apps and most servers.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/Makefile.common

    r5edb1f5 re5773c6  
    2828#
    2929
    30 ## Setup toolchain
     30## Common rules for building servers.
    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
     48LIBFS_PREFIX = $(USPACE_PREFIX)/lib/libfs
     49LIBPCI_PREFIX = $(USPACE_PREFIX)/lib/libpci
     50SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
     51
     52JOB = $(OUTPUT).job
    4553
    4654OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    4755
    48 .PHONY: all
     56include $(LIBC_PREFIX)/Makefile.toolchain
    4957
    50 all: $(OUTPUT) $(OUTPUT).disasm
     58CFLAGS += $(EXTRA_CFLAGS)
     59
     60.PHONY: all build clean
     61
     62all: \
     63    $(LIBC_PREFIX)/../../../version \
     64    $(LIBC_PREFIX)/../../../Makefile.config \
     65    $(LIBC_PREFIX)/../../../config.h \
     66    $(LIBC_PREFIX)/../../../config.defs \
     67    $(LIBS) \
     68    \
     69    $(OUTPUT) $(OUTPUT).disasm
     70        -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
     71
     72clean:
     73        rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
     74        find . -name '*.o' -follow -exec rm \{\} \;
     75
     76build:
    5177
    5278-include $(DEPEND)
Note: See TracChangeset for help on using the changeset viewer.