Subversion Repositories freemyipod

Rev

Rev 450 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
445 theseven 1
srcdir = @srcdir@
2
VPATH = @srcdir@
3
prefix = @prefix@
4
exec_prefix = @exec_prefix@
5
 
6
bindir = @bindir@
7
libdir = @libdir@
8
includedir = @includedir@
9
 
462 theseven 10
ifeq ($(shell uname),WindowsNT)
11
CCACHE :=
12
else
13
CCACHE := $(shell which ccache)
14
endif
15
 
16
CC = $(CCACHE) @CC@
445 theseven 17
CPU = @target_cpu@
18
TARGET = @target_alias@
19
SYMBOL_PREFIX = @SYMBOL_PREFIX@
20
CFLAGS = @CFLAGS@
450 theseven 21
INCLUDES = -I$(srcdir) @bfd_include_dir@ @binutils_include_dir@ -I../ucl/include
445 theseven 22
CPPFLAGS = @CPPFLAGS@ $(DEFS) $(INCLUDES)
23
LDFLAGS = @LDFLAGS@
450 theseven 24
LDLIBS = @LIBS@ ../ucl/src/libucl.a
445 theseven 25
INSTALL = @INSTALL@
26
DEFS = @DEFS@ \
27
	-DTARGET_$(CPU) \
28
	-DTARGET_CPU=\"$(CPU)\" \
29
	-DSYMBOL_PREFIX=\"$(SYMBOL_PREFIX)\" \
30
	-DBINUTILS_LDSCRIPTDIR=\"@binutils_ldscript_dir@\" \
31
	-DTARGET_ALIAS=\"$(TARGET)\" \
32
	-DNO_GOT_CHECK=@got_check@ \
33
	-DUSE_EMIT_RELOCS=@emit_relocs@ \
34
	-DEMIT_CTOR_DTOR=@emit_ctor_dtor@ \
35
	-DALWAYS_RELOC_TEXT=@always_reloc_text@
36
EXEEXT = @EXEEXT@
37
OBJEXT = @OBJEXT@
38
 
39
HOST = @host_alias@
40
 
41
ifneq (,$(findstring mingw32,$(HOST)))
42
   LDLIBS += -lws2_32
43
endif
44
 
45
# force link order under cygwin to avoid getopts / libiberty clash
46
ifneq ($(strip $(shell gcc -v 2>&1 | grep "cygwin")),)
47
   LDLIBS := -lcygwin $(LDLIBS)
48
endif
49
 
50
target_bindir = $(prefix)/$(TARGET)/bin
51
target_libdir = $(prefix)/$(TARGET)/lib
52
 
53
 
450 theseven 54
PROG_ELF2EMCOREAPP = elf2emcoreapp$(EXEEXT)
445 theseven 55
 
450 theseven 56
PROGS = $(PROG_ELF2EMCOREAPP)
445 theseven 57
 
58
all: $(PROGS)
59
 
60
# We need to declare the link explicitly because make only provides
61
# implicit rules when EXEEXT is set to nothing
62
link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
63
 
450 theseven 64
$(PROG_ELF2EMCOREAPP): elf2emcoreapp.o compress.o stubs.o
445 theseven 65
	$(link)
66
 
67
Makefile: $(srcdir)/Makefile.in
68
	./config.status $@
69
 
70
clean:
71
	-rm -f $(PROGS) *.$(OBJEXT) .deps
72
 
73
distclean: clean
450 theseven 74
	-rm -f Makefile config.log config.status config.cache
75
	-rm -rf autom4te.cache
445 theseven 76
 
77
install:
78
	$(INSTALL) -d $(target_bindir)
79
	$(INSTALL) -d $(target_libdir)
450 theseven 80
	$(INSTALL) -m 755 $(PROG_ELF2EMCOREAPP) $(bindir)/$(TARGET)-$(PROG_ELF2EMCOREAPP)
81
	$(INSTALL) -m 755 $(PROG_ELF2EMCOREAPP) $(target_bindir)/$(PROG_ELF2EMCOREAPP)
445 theseven 82
 
83
sinclude .deps
84
.deps:
85
	$(CC) -MM $(CPPFLAGS) $(srcdir)/*.c > .deps