Statistics
| Branch: | Revision:

scoutos / prex-0.9.0 / mk / task.mk @ 03e9c04a

History | View | Annotate | Download (725 Bytes)

1
# Rules to compile a real-time task
2

    
3
include $(SRCDIR)/mk/own.mk
4

    
5
DEFS+=		_STANDALONE
6
INCSDIR+=	$(SRCDIR)/usr/include
7
LIBSDIR+=	$(SRCDIR)/usr/lib
8
CRT0:=		$(SRCDIR)/usr/lib/crt0.o
9
LIBC:=		$(SRCDIR)/usr/lib/libsa.a
10

    
11
ifeq ($(CONFIG_MMU),y)
12
LDSCRIPT:=	$(SRCDIR)/usr/arch/$(ARCH)/user.ld
13
STRIPFLAG:=	-s
14
else
15
LDSCRIPT:=	$(SRCDIR)/usr/arch/$(ARCH)/user-nommu.ld
16
STRIPFLAG:=	--strip-debug --strip-unneeded
17
_RELOC_OBJ_:=	1
18
endif
19

    
20
ifdef TASK
21
TARGET?=	$(TASK)
22
ifndef SRCS
23
SRCS:=		$(basename $(TASK)).c
24
endif
25
endif
26

    
27
include $(SRCDIR)/mk/common.mk
28

    
29
$(TARGET): $(LIBS) $(OBJS)
30
	$(call echo-file,LD     ,$@)
31
	$(LD) $(LDFLAGS) $(OUTPUT_OPTION) $(CRT0) $(OBJS) $(LIBS) $(LIBC) $(PLATFORM_LIBS)
32
	$(ASMGEN)
33
	$(SYMGEN)
34
	$(STRIP) $(STRIPFLAG) $@