diff options
Diffstat (limited to 'mtools/Makefile')
| -rw-r--r-- | mtools/Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mtools/Makefile b/mtools/Makefile index 26909a30..546e3d14 100644 --- a/mtools/Makefile +++ b/mtools/Makefile @@ -1,8 +1,14 @@ +gcc_ok = $(shell if gcc $(1) ../dummy.c -o /dev/null 2>/dev/null; \ + then echo '$(1)'; else echo '$(2)'; fi) + +comma := , +LDHASH := $(call gcc_ok,-Wl$(comma)--hash-style=both,) + CC = gcc OPTFLAGS = -g -Os INCLUDES = -I. -I.. -I../libfat CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) -LDFLAGS = -s +LDFLAGS = $(LDHASH) -s SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c) OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS))) |
