OSDN Git Service
(root)
/
uclinux-h8
/
elf2flt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unify the duplicated windows and other system fallback logic in stubs.h
[uclinux-h8/elf2flt.git]
/
Makefile.in
diff --git
a/Makefile.in
b/Makefile.in
index
f041890
..
fc00851
100644
(file)
--- a/
Makefile.in
+++ b/
Makefile.in
@@
-11,10
+11,10
@@
CC = @CC@
CPU = @target_cpu@
TARGET = @target_alias@
CFLAGS = @CFLAGS@
CPU = @target_cpu@
TARGET = @target_alias@
CFLAGS = @CFLAGS@
-INCLUDES = @bfd_include_dir@ @binutils_include_dir@ @zlib_include_dir@
-CPPFLAGS = @CPPFLAGS@
+INCLUDES =
-I$(srcdir)
@bfd_include_dir@ @binutils_include_dir@ @zlib_include_dir@
+CPPFLAGS = @CPPFLAGS@
$(DEFS) $(INCLUDES)
LDFLAGS = @LDFLAGS@
LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
+L
DL
IBS = @LIBS@
INSTALL = @INSTALL@
DEFS = @DEFS@ -DTARGET_$(CPU)
EXEEXT = @EXEEXT@
INSTALL = @INSTALL@
DEFS = @DEFS@ -DTARGET_$(CPU)
EXEEXT = @EXEEXT@
@@
-23,19
+23,17
@@
OBJEXT = @OBJEXT@
HOST = @host_alias@
ifneq (,$(findstring mingw32,$(HOST)))
HOST = @host_alias@
ifneq (,$(findstring mingw32,$(HOST)))
- L
IBS := $(LIBS)
-lws2_32
+ L
DLIBS +=
-lws2_32
endif
# force link order under cygwin to avoid getopts / libiberty clash
ifneq ($(strip $(shell gcc -v 2>&1 | grep "cygwin")),)
endif
# force link order under cygwin to avoid getopts / libiberty clash
ifneq ($(strip $(shell gcc -v 2>&1 | grep "cygwin")),)
- L
IBS := -lcygwin $(
LIBS)
+ L
DLIBS := -lcygwin $(LD
LIBS)
endif
endif
-CCFLAGS = $(CFLAGS) $(DEFS) $(INCLUDES)
-
LDFILE= elf2flt.ld
ifeq ($(strip $(CPU)),e1)
LDFILE= elf2flt.ld
ifeq ($(strip $(CPU)),e1)
-SRC_LDFILE= $(CPU)-elf2flt.ld
+SRC_LDFILE= $(
srcdir)/$(
CPU)-elf2flt.ld
else
SRC_LDFILE= elf2flt.ld
endif
else
SRC_LDFILE= elf2flt.ld
endif
@@
-48,19
+46,26
@@
PROG_ELF2FLT = elf2flt$(EXEEXT)
PROG_FLTHDR = flthdr$(EXEEXT)
PROGS = $(PROG_ELF2FLT) $(PROG_FLTHDR)
PROG_FLTHDR = flthdr$(EXEEXT)
PROGS = $(PROG_ELF2FLT) $(PROG_FLTHDR)
-all: $(PROGS)
+all: $(PROGS) ld-elf2flt
+
+# We need to declare the link explicitly because make only provides
+# implicit rules when EXEEXT is set to nothing
+link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
-$(PROG_ELF2FLT):
$(srcdir)/elf2flt.c compress.o $(srcdir)/stubs.c
- $(
CC) $(CCFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS
)
+$(PROG_ELF2FLT):
elf2flt.o compress.o stubs.o
+ $(
link
)
-$(PROG_FLTHDR): $(srcdir)/flthdr.c compress.o
- $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+$(PROG_FLTHDR): flthdr.o compress.o stubs.o
+ $(link)
+
+ld-elf2flt: $(srcdir)/ld-elf2flt.in
+ ./config.status $@
Makefile: $(srcdir)/Makefile.in
./config.status $@
clean:
Makefile: $(srcdir)/Makefile.in
./config.status $@
clean:
- -rm -f $(PROGS) *.$(OBJEXT)
+ -rm -f $(PROGS) *.$(OBJEXT)
.deps
distclean: clean
-rm -f Makefile config.log config.status config.cache ld-elf2flt
distclean: clean
-rm -f Makefile config.log config.status config.cache ld-elf2flt
@@
-79,6
+84,8
@@
install:
mv $(target_bindir)/ld$(EXEEXT) $(target_bindir)/ld.real$(EXEEXT)
$(INSTALL) -m 755 ld-elf2flt $(bindir)/$(TARGET)-ld
$(INSTALL) -m 755 ld-elf2flt $(target_bindir)/ld
mv $(target_bindir)/ld$(EXEEXT) $(target_bindir)/ld.real$(EXEEXT)
$(INSTALL) -m 755 ld-elf2flt $(bindir)/$(TARGET)-ld
$(INSTALL) -m 755 ld-elf2flt $(target_bindir)/ld
- $(INSTALL) -m 644 $(srcdir)/$(SRC_LDFILE) $(target_libdir)/$(LDFILE)
-
+ $(INSTALL) -m 644 $(SRC_LDFILE) $(target_libdir)/$(LDFILE)
+sinclude .deps
+.deps:
+ $(CC) -MM $(CPPFLAGS) *.c > .deps