Changeset 3b3e776 in mainline for uspace/lib/Makefile.common
- Timestamp:
- 2010-02-05T10:57:50Z (16 years ago)
- 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. - File:
-
- 1 moved
-
uspace/lib/Makefile.common (moved) (moved from uspace/lib/softint/Makefile.build ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/Makefile.common
r3f085132 r3b3e776 28 28 # 29 29 30 ## Setup toolchain30 ## Common rules for building apps. 31 31 # 32 32 33 include Makefile.common 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 41 # 42 43 DEPEND = Makefile.depend 44 DEPEND_PREV = $(DEPEND).prev 45 46 LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc 47 48 JOB = $(OUTPUT).job 49 50 OBJECTS = $(addsuffix .o,$(basename $(SOURCES))) 51 52 -include $(USPACE_PREFIX)/../Makefile.config 34 53 include $(LIBC_PREFIX)/Makefile.toolchain 35 54 36 CFLAGS += -Iinclude55 CFLAGS += $(EXTRA_CFLAGS) 37 56 38 ## Sources 39 # 57 .PHONY: all build clean 40 58 41 SOURCES = \ 42 generic/division.c\ 43 generic/multiplication.c 59 all: \ 60 $(LIBC_PREFIX)/../../../version \ 61 $(LIBC_PREFIX)/../../../Makefile.config \ 62 $(LIBC_PREFIX)/../../../config.h \ 63 $(LIBC_PREFIX)/../../../config.defs \ 64 $(LIBS) \ 65 \ 66 $(OUTPUT) \ 67 $(EXTRA_OUTPUT) 68 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 44 69 45 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 70 clean: 71 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN) 72 find . -name '*.o' -follow -exec rm \{\} \; 46 73 47 .PHONY: all 48 49 all: $(LIBSOFTINT) 74 build: 50 75 51 76 -include $(DEPEND) 52 77 53 $( LIBSOFTINT): $(OBJECTS)78 $(OUTPUT): $(OBJECTS) 54 79 $(AR) rc $@ $(OBJECTS) 80 81 %.o: %.S $(DEPEND) 82 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 83 ifeq ($(PRECHECK),y) 84 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ 85 endif 86 87 %.o: %.s $(DEPEND) 88 $(AS) $(AFLAGS) $< -o $@ 89 ifeq ($(PRECHECK),y) 90 $(JOBFILE) $(JOB) $< $@ as asm $(AFLAGS) 91 endif 55 92 56 93 %.o: %.c $(DEPEND) 57 94 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 95 ifeq ($(PRECHECK),y) 96 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 97 endif 58 98 59 $(DEPEND): 99 $(DEPEND): $(PRE_DEPEND) 60 100 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null 61 101 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Note:
See TracChangeset
for help on using the changeset viewer.
