File: Makefile

package info (click to toggle)
isdnbutton 2.6-970413-13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 200 kB
  • ctags: 125
  • sloc: ansic: 728; sh: 192; makefile: 112
file content (75 lines) | stat: -rw-r--r-- 2,918 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
CPPFLAGS    = -D_GNU_SOURCE -I /usr/X11R6/include
LDLIBS      = -L /usr/X11R6/lib -lXmu -lSM -lICE -lXext -lXaw -lXt -lXpm -lX11
CFLAGS      = -pipe -g -O2 -Wall
LDFLAGS     = -pipe
CC          = gcc
LD          = gcc
# Some "black" magic to determine optimal compiler flags for target
# architecture
#UNAME_ARCH:= $(shell uname -m)
#TARGET_ARCH:= $(shell if [ \! -r .compile-options ] ; then ( \
#                cpu=`grep cpu /proc/cpuinfo 2>&1 |head -1| \
#                     cut -d : -f 2-| sed -e 's/ //g'`; \
#                if [ x"$$cpu" = x"" ] ; then \
#                  echo -fno-strength-reduce; \
#                else if [ "$$cpu" = "386" ] ; then \
#                  echo -m386 -fno-strength-reduce; \
#                else if [ "$$cpu" = "486" ] ; then \
#                  echo -m486 -fno-strength-reduce; \
#                else if [ "$$cpu" = "Alpha" ] ; then \
#                  echo -fno-strength-reduce; \
#		else if [ $(UNAME_ARCH) = ppc ] ; then \
#		  echo -fno-strength-reduce; \
#                else echo main\(\)\{\} >.compile-options.c; \
#                    if gcc -mpentium -o .compile-options.o -c \
#                          .compile-options.c &>/dev/null; then \
#                        echo -mpentium -fstrength-reduce; \
#                    else if gcc -m486 -malign-functions=2 -malign-jumps=2 \
#                             -malign-loops=2 -o .compile-options.o -c \
#                             .compile-options.c &>/dev/null; then \
#                        echo -n -m486 -malign-functions=2 -malign-jumps=2; \
#                        echo ' '-malign-loops=2 -fno-strength-reduce; \
#                    else echo -m486; \
#              fi;fi;fi;fi;fi;fi;fi) > .compile-options; \
#              rm -f .compile-options.c .compile-options.o; \
#              fi; cat .compile-options)
#ASFLAGS     = $(TARGET_ARCH)

OBJS        = isdnbutton.o

##############################################################################

ifeq (.depend,$(wildcard .depend))
all: isdnbutton
include .depend
else
all: depend
	@$(MAKE) all
endif

##############################################################################

isdnbutton: $(OBJS)

##############################################################################

clean:
	$(RM) *~ *.o *.dvi *.log *.aux *yacc.tab.[ch] *yacc.output *lex.[co] \
              *.dat .depend .tmp_depend .compile-options*
	strip isdnbutton >&/dev/null || true

##############################################################################

depend:	red.dat yellow.dat green.dat
	for i in *.c;do $(CPP) $(CPPFLAGS) -MM $$i;done >.tmp_depend
	mv .tmp_depend .depend

##############################################################################

.SUFFIXES:	.xpm .dat

.xpm.dat:
	echo '"*'$*'Icon: "' > $@
	sed -e '/^\/\*.*\*\//d' -e '/\/\*/,/\*\//d' -e '/"/!d' \
            -e 's/[ 	]*"\(.*\)"[,}; 	]*$$/"\1\\\\n"/' $< >> $@
	echo ',' >>$@