Subversion Repositories freemyipod

Rev

Rev 551 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
870 theseven 1
#             __________               __   ___.
2
#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
3
#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
4
#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
5
#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
6
#                     \/            \/     \/    \/            \/
7
# $Id: Makefile 23982 2009-12-13 21:30:28Z bluebrother $
8
#
9
 
10
DIR = ../build/
11
OUT = $(DIR)libucl/
12
 
13
ifeq ($(shell uname),WindowsNT)
14
CCACHE :=
15
else
16
CCACHE := $(shell which ccache)
17
endif
18
 
19
CROSS   ?= arm-elf-eabi-
20
CC      := $(CCACHE) $(CROSS)gcc
21
AR      := $(CROSS)ar
22
RANLIB  := $(CROSS)ranlib
23
 
24
OBJS = $(OUT)/alloc.o $(OUT)/n2b_99.o $(OUT)/n2b_d.o $(OUT)/n2b_ds.o $(OUT)/n2b_to.o $(OUT)/n2d_99.o	\
25
	$(OUT)/n2d_d.o $(OUT)/n2d_ds.o $(OUT)/n2d_to.o $(OUT)/n2e_99.o $(OUT)/n2e_d.o $(OUT)/n2e_ds.o $(OUT)/n2e_to.o $(OUT)/ucl_crc.o	\
26
	$(OUT)/ucl_dll.o $(OUT)/ucl_init.o $(OUT)/ucl_ptr.o $(OUT)/ucl_str.o $(OUT)/ucl_util.o
27
 
28
$(DIR)/libucl.a: $(OBJS)
29
	@echo [AR]     $@
30
	@$(AR) ruv $@ $^
31
	@echo [RANLIB] $@
32
	@$(RANLIB) $@
33
 
34
$(OUT)/%.o: %.c
35
	@echo [CC]     $<
36
ifeq ($(shell uname),WindowsNT)
37
	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
38
else
39
	@-mkdir -p $(dir $@)
40
endif
41
	@$(CC) $(CFLAGS) -c $< -o $@
42
 
43
clean:
44
	rm -f $(OUT)/libucl.a