4 exec_prefix = @exec_prefix@
8 includedir = @includedir@
12 TARGET = @target_alias@
14 INCLUDES = @bfd_include_dir@ @binutils_include_dir@
16 LDFLAGS = @LDFLAGS@ -static
19 DEFS = @DEFS@ -DTARGET_$(CPU)
23 CCFLAGS = $(CFLAGS) $(DEFS) $(INCLUDES)
26 ifeq ($(strip $(CPU)),e1)
27 SRC_LDFILE= $(CPU)-elf2flt.ld
29 SRC_LDFILE= elf2flt.ld
32 target_bindir = $(prefix)/$(TARGET)/bin
33 target_libdir = $(prefix)/$(TARGET)/lib
36 PROG_ELF2FLT = elf2flt$(EXEEXT)
37 PROG_FLTHDR = flthdr$(EXEEXT)
38 PROGS = $(PROG_ELF2FLT) $(PROG_FLTHDR)
42 $(PROG_ELF2FLT): elf2flt.c stubs.c Makefile
43 $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(srcdir)/elf2flt.c $(srcdir)/stubs.c $(LIBS)
45 $(PROG_FLTHDR): flthdr.c Makefile
46 $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(srcdir)/flthdr.c $(LIBS)
49 -rm -f $(PROGS) *.$(OBJEXT)
52 -rm -f Makefile config.log config.status config.cache ld-elf2flt
55 $(INSTALL) -d $(bindir)
56 $(INSTALL) -d $(target_bindir)
57 $(INSTALL) -d $(target_libdir)
58 $(INSTALL) -s -m 755 $(PROG_FLTHDR) $(bindir)/$(TARGET)-$(PROG_FLTHDR)
59 $(INSTALL) -s -m 755 $(PROG_FLTHDR) $(target_bindir)/$(PROG_FLTHDR)
60 $(INSTALL) -s -m 755 $(PROG_ELF2FLT) $(bindir)/$(TARGET)-$(PROG_ELF2FLT)
61 $(INSTALL) -s -m 755 $(PROG_ELF2FLT) $(target_bindir)/$(PROG_ELF2FLT)
62 [ -f $(bindir)/$(TARGET)-ld.real$(EXEEXT) ] || \
63 mv $(bindir)/$(TARGET)-ld$(EXEEXT) $(bindir)/$(TARGET)-ld.real$(EXEEXT)
64 [ -f $(target_bindir)/ld.real$(EXEEXT) ] || \
65 mv $(target_bindir)/ld$(EXEEXT) $(target_bindir)/ld.real$(EXEEXT)
66 $(INSTALL) -m 755 ld-elf2flt $(bindir)/$(TARGET)-ld
67 $(INSTALL) -m 755 ld-elf2flt $(target_bindir)/ld
68 $(INSTALL) -m 644 $(srcdir)/$(SRC_LDFILE) $(target_libdir)/$(LDFILE)