Subversion Repositories freemyipod

Rev

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