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

Changeset cf240cb in mainline


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).

Location:
uspace/lib
Files:
9 deleted
5 edited
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
  • uspace/lib/libblock/Makefile

    r15eeb93 rcf240cb  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = libblock.a
    3334
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
     35SOURCES = \
     36        libblock.c
    3737
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(LIBBLOCK)
    40         find . -name '*.o' -follow -exec rm \{\} \;
     38include ../Makefile.common
  • uspace/lib/libfs/Makefile

    r15eeb93 rcf240cb  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = libfs.a
    3334
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
     35SOURCES = \
     36        libfs.c
    3737
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(LIBFS)
    40         find . -name '*.o' -follow -exec rm \{\} \;
     38include ../Makefile.common
  • uspace/lib/libpci/Makefile

    r15eeb93 rcf240cb  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
    3132
    32 .PHONY: all clean
     33OUTPUT = libpci.a
    3334
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
     35SOURCES = \
     36        access.c \
     37        generic.c \
     38        names.c \
     39        i386-ports.c
    3740
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(LIBPCI)
    40         find . -name '*.o' -follow -exec rm \{\} \;
     41include ../Makefile.common
  • uspace/lib/softfloat/Makefile

    r15eeb93 rcf240cb  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
     32EXTRA_CFLAGS += -Iinclude -Iarch/$(UARCH)/include/
    3133
    32 .PHONY: all clean
     34OUTPUT = libsoftfloat.a
    3335
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
     36SOURCES = \
     37        generic/add.c \
     38        generic/common.c \
     39        generic/comparison.c \
     40        generic/conversion.c \
     41        generic/div.c \
     42        generic/mul.c \
     43        generic/other.c \
     44        generic/softfloat.c \
     45        generic/sub.c
    3746
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(LIBSOFTFLOAT)
    40         find . -name '*.o' -follow -exec rm \{\} \;
     47include ../Makefile.common
  • uspace/lib/softint/Makefile

    r15eeb93 rcf240cb  
    2828#
    2929
    30 include Makefile.common
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBC_PREFIX)/libc.a
     32EXTRA_CFLAGS = -Iinclude
    3133
    32 .PHONY: all clean
     34OUTPUT = libsoftint.a
    3335
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBC_PREFIX)/libc.a
    35         -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    36         $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
     36SOURCES = \
     37        generic/division.c\
     38        generic/multiplication.c
    3739
    38 clean:
    39         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(LIBSOFTINT)
    40         find . -name '*.o' -follow -exec rm \{\} \;
     40include ../Makefile.common
Note: See TracChangeset for help on using the changeset viewer.