Remove *_fill_nic() calls, and directly set nic->ioaddr and nic->irqno .
[gpxe.git] / contrib / ppmtoansi / Makefile
blobbc0ca0a6813bd6e26e1daf0ff4a312a037d26e12
1 CPPFLAGS =
2 LDLIBS =
3 CFLAGS = -pipe -g -O2 -Wall
4 LDFLAGS = -pipe
5 CC = gcc
6 LD = gcc
7 # Some "black" magic to determine optimal compiler flags for target
8 # architecture
9 TARGET_ARCH:= $(shell if [ \! -r .compile-options ] ; then ( \
10 cpu=`grep cpu /proc/cpuinfo 2>&1 |head -1| \
11 cut -d : -f 2-| sed -e 's/ //g'`; \
12 if [ x"$$cpu" = x"" ] ; then \
13 echo -fno-strength-reduce; \
14 else if [ "$$cpu" = "386" ] ; then \
15 echo -m386 -fno-strength-reduce; \
16 else if [ "$$cpu" = "486" ] ; then \
17 echo -m486 -fno-strength-reduce; \
18 else if [ "$$cpu" = "Alpha" ] ; then \
19 echo -fno-strength-reduce; \
20 else echo main\(\)\{\} >.compile-options.c; \
21 if gcc -mpentium -o .compile-options.o -c \
22 .compile-options.c &>/dev/null; then \
23 echo -mpentium -fstrength-reduce; \
24 else if gcc -m486 -malign-functions=2 -malign-jumps=2 \
25 -malign-loops=2 -o .compile-options.o -c \
26 .compile-options.c &>/dev/null; then \
27 echo -n -m486 -malign-functions=2 -malign-jumps=2; \
28 echo ' '-malign-loops=2 -fno-strength-reduce; \
29 else echo -m486; \
30 fi;fi;fi;fi;fi;fi) > .compile-options; \
31 rm -f .compile-options.c .compile-options.o; \
32 fi; cat .compile-options)
33 ASFLAGS = $(TARGET_ARCH)
35 OBJS = ppmtoansi.o
37 ##############################################################################
39 ifeq (.depend,$(wildcard .depend))
40 all: ppmtoansi
41 include .depend
42 else
43 all: depend
44 @$(MAKE) all
45 endif
47 ##############################################################################
49 ppmtoansi: $(OBJS)
51 ##############################################################################
53 clean:
54 $(RM) *~ *.o *.dvi *.log *.aux *yacc.tab.[ch] *yacc.output *lex.[co] \
55 *.dat .depend .tmp_depend .compile-options*
56 strip ppmtoansi >&/dev/null || true
58 distclean: clean
59 $(RM) -rf ppmtoansi
61 ##############################################################################
63 depend:
64 for i in *.c;do $(CPP) $(CPPFLAGS) -MM $$i;done >.tmp_depend
65 mv .tmp_depend .depend
67 ##############################################################################