ldlinux: Fix serial output and delete eprintf()
[syslinux.git] / com32 / elflink / ldlinux / Makefile
blob556f93a55cc4a51d670b36590d43a33e46db5a75
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2011-2013 Intel Corporation - All Rights Reserved
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
13 topdir = ../../..
14 MAKEDIR = $(topdir)/mk
15 include $(MAKEDIR)/elf.mk
17 CFLAGS += -I$(topdir)/core/elflink -I$(topdir)/core/include -I$(topdir)/com32/lib -fvisibility=hidden
18 LIBS = --whole-archive $(com32)/lib/libcom32min.a
20 BTARGET = ldlinux.c32
22 all: $(BTARGET) ldlinux_lnx.a
24 ldlinux.elf : ldlinux.o cli.o readconfig.o refstr.o colors.o getadv.o \
25 adv.o execute.o chainboot.o kernel.o get_key.o \
26 advwrite.o setadv.o loadhigh.o msg.o
27 $(LD) $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ $(LIBS)
29 LNXCFLAGS += -D__export='__attribute__((visibility("default")))'
30 LNXLIBOBJS = get_key.lo
31 ldlinux_lnx.a: $(LNXLIBOBJS)
32 rm -f $@
33 $(AR) cq $@ $(LNXLIBOBJS)
34 $(RANLIB) $@
36 tidy dist:
37 rm -f *.o *.lo *.a *.lst .*.d
39 clean: tidy
40 rm -f *.lss *.lnx *.com
42 spotless: clean
43 rm -f *~ \#* $(BTARGET)
45 install: all
46 mkdir -m 755 -p $(INSTALLROOT)$(AUXDIR)
47 install -m 644 $(BTARGET) $(INSTALLROOT)$(AUXDIR)
50 -include .*.d