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

Changeset cf240cb in mainline for uspace/lib/Makefile.common


Ignore:
Timestamp:
2010-01-16T19:15:02Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
079f440
Parents:
15eeb93
Message:

Common make rules for libraries (except libc).

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/Makefile.common

    r15eeb93 rcf240cb  
    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 CFLAGS += -Iinclude
    37 
    38 ## 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
    3941#
    4042
    41 SOURCES = \
    42         generic/division.c\
    43         generic/multiplication.c
     43DEPEND = Makefile.depend
     44DEPEND_PREV = $(DEPEND).prev
     45
     46LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
     47
     48JOB = $(OUTPUT).job
    4449
    4550OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    4651
    47 .PHONY: all
     52include $(LIBC_PREFIX)/Makefile.toolchain
    4853
    49 all: $(LIBSOFTINT)
     54CFLAGS += $(EXTRA_CFLAGS)
     55
     56.PHONY: all build clean
     57
     58all: \
     59    $(LIBC_PREFIX)/../../../version \
     60    $(LIBC_PREFIX)/../../../Makefile.config \
     61    $(LIBC_PREFIX)/../../../config.h \
     62    $(LIBC_PREFIX)/../../../config.defs \
     63    $(LIBS) \
     64    \
     65    $(OUTPUT)
     66        -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
     67
     68clean:
     69        rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT)
     70        find . -name '*.o' -follow -exec rm \{\} \;
     71
     72build:
    5073
    5174-include $(DEPEND)
    5275
    53 $(LIBSOFTINT): $(OBJECTS)
     76$(OUTPUT): $(OBJECTS)
    5477        $(AR) rc $@ $(OBJECTS)
    5578
Note: See TracChangeset for help on using the changeset viewer.