Remove line-leading gas-style comments in files compiled with -std=gnu99
[syslinux.git] / com32 / MCONFIG
blob2b7e018be54562dd2d14f777f9786b22f7acce94
1 ## -*- makefile -*- -------------------------------------------------------
2 ##   
3 ##   Copyright 2008 H. Peter Anvin - 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., 51 Franklin St, Fifth Floor,
8 ##   Boston MA 02110-1301, USA; either version 2 of the License, or
9 ##   (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
14 ## COM32 common configurables
17 include $(topdir)/MCONFIG
19 GCCOPT := $(call gcc_ok,-std=gnu99,) \
20           $(call gcc_ok,-m32,) \
21           $(call gcc_ok,-fno-stack-protector,) \
22           -mregparm=3 -DREGPARM=3 -march=i386 -Os
24 com32 = $(topdir)/com32
26 CFLAGS     = $(GCCOPT) -W -Wall -march=i386 \
27              -fomit-frame-pointer -D__COM32__ \
28              -nostdinc -iwithprefix include \
29              -I$(com32)/libutil/include -I$(com32)/include
30 SFLAGS     = $(GCCOPT) -D__COM32__ -march=i386
31 LDFLAGS    = -m elf_i386 -T $(com32)/lib/com32.ld
32 LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
34 LNXCFLAGS  = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
35 LNXSFLAGS  = -g
36 LNXLDFLAGS = -g
38 C_LIBS     = $(com32)/libutil/libutil_com.a $(com32)/lib/libcom32.a $(LIBGCC)
39 C_LNXLIBS  = $(com32)/libutil/libutil_lnx.a
41 .SUFFIXES: .lss .c .lo .o .elf .c32 .lnx
43 .PRECIOUS: %.o
44 %.o: %.S
45         $(CC) $(SFLAGS) -c -o $@ $<
47 .PRECIOUS: %.o
48 %.o: %.c
49         $(CC) $(CFLAGS) -c -o $@ $<
51 .PRECIOUS: %.elf
52 %.elf: %.o $(LIBS) $(C_LIBS)
53         $(LD) $(LDFLAGS) -o $@ $^
55 .PRECIOUS: %.lo
56 %.lo: %.S
57         $(CC) $(LNXSFLAGS) -c -o $@ $<
59 .PRECIOUS: %.lo
60 %.lo: %.c
61         $(CC) $(LNXCFLAGS) -c -o $@ $<
63 .PRECIOUS: %.lnx
64 %.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS)
65         $(CC) $(LNXCFLAGS) -o $@ $^
67 %.c32: %.elf
68         $(OBJCOPY) -O binary $< $@