Changeset 48e1467 in mainline for uspace/srv/Makefile.common
- Timestamp:
- 2010-01-22T16:52:17Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0cb2d72
- Parents:
- 92bee46 (diff), 9d3133d (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
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/Makefile.common
r92bee46 r48e1467 28 28 # 29 29 30 ## Setup toolchain30 ## Common rules for building servers. 31 31 # 32 32 33 include Makefile.common 34 include $(LIBC_PREFIX)/Makefile.toolchain 35 include arch/$(UARCH)/Makefile.inc 36 37 CFLAGS += -Iinclude 38 LINK = arch/$(UARCH)/_link.ld 39 40 # # Sources33 # 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 41 # 42 42 43 GENERIC_SOURCES = \ 44 main.c \ 45 elf_load.c \ 46 interp.s 43 DEPEND = Makefile.depend 44 DEPEND_PREV = $(DEPEND).prev 47 45 48 SOURCES := $(GENERIC_SOURCES) $(ARCH_SOURCES) 46 LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc 47 LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock 48 LIBFS_PREFIX = $(USPACE_PREFIX)/lib/libfs 49 LIBPCI_PREFIX = $(USPACE_PREFIX)/lib/libpci 50 SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint 51 52 LINK_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld 53 54 JOB = $(OUTPUT).job 55 49 56 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 50 57 51 .PHONY: all 58 include $(LIBC_PREFIX)/Makefile.toolchain 52 59 53 all: $(OUTPUT) $(OUTPUT).disasm 60 CFLAGS += $(EXTRA_CFLAGS) 61 62 .PHONY: all build clean 63 64 all: \ 65 $(LIBC_PREFIX)/../../../version \ 66 $(LIBC_PREFIX)/../../../Makefile.config \ 67 $(LIBC_PREFIX)/../../../config.h \ 68 $(LIBC_PREFIX)/../../../config.defs \ 69 $(LIBS) \ 70 \ 71 $(OUTPUT) $(OUTPUT).disasm \ 72 $(EXTRA_OUTPUT) 73 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 74 75 clean: 76 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm $(EXTRA_OUTPUT) 77 find . -name '*.o' -follow -exec rm \{\} \; 78 79 build: 54 80 55 81 -include $(DEPEND) … … 58 84 $(OBJDUMP) -d $< > $@ 59 85 60 $(OUTPUT): $(OBJECTS) $(LIBS) $(LINK) 61 $(LD) -T $(LINK) $(LFLAGS) $(OBJECTS) $(LIBS) -o $@ -Map $(OUTPUT).map 62 63 $(LINK): $(LINK).in 64 $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ 86 $(OUTPUT): $(LINK_SCRIPT) $(OBJECTS) $(LIBS) 87 $(LD) -T $(LINK_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 65 88 66 89 %.o: %.c $(DEPEND) … … 70 93 endif 71 94 72 %.o: %.s $(DEPEND)73 $(AS) $(AFLAGS) $< -o $@74 ifeq ($(PRECHECK),y)75 $(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS)76 endif77 78 95 $(DEPEND): 79 96 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
Note:
See TracChangeset
for help on using the changeset viewer.