1 # Makefile de ejemplo para C++
3 # Creado: jue abr 15 15:34:19 ART 2004
5 # Copyleft 2004 - Leandro Lucarella, Bajo licencia GPL [http://www.gnu.org/]
11 # Opciones para el compilador C/C++ en modo ansi.
12 CFLAGS = -Wall -ansi -pedantic-errors
14 # Para que explote lo mas posible
15 #CFLAGS += -O3 -DNDEBUG
17 # Para valgrind o debug
18 CFLAGS += -ggdb -DDEBUG
20 # Opciones para el compilador C++.
21 CXXFLAGS = $(CFLAGS) -fno-inline
23 # Opciones del enlazador.
30 targets=test_send test_recv test_ipaddr
33 fuentes ?= $(wildcard *.cpp)
41 all: depend $(targets)
43 test_send: test_send.o dev.o
45 test_recv: test_recv.o dev.o
47 test_ipaddr: test_ipaddr.o ipaddr.o
50 @makedepend $(fuentes) > /dev/null 2>&1
53 @$(RM) -fv *.o $(targets)
57 dev.o: dev.h /usr/include/unistd.h /usr/include/features.h
58 dev.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
59 dev.o: /usr/include/bits/posix_opt.h /usr/include/bits/types.h
60 dev.o: /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h
61 dev.o: /usr/include/bits/confname.h /usr/include/getopt.h
62 dev.o: /usr/include/fcntl.h /usr/include/bits/fcntl.h
63 dev.o: /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h
64 dev.o: /usr/include/bits/endian.h /usr/include/sys/select.h
65 dev.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
66 dev.o: /usr/include/bits/time.h /usr/include/sys/sysmacros.h
67 dev.o: /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h
68 dev.o: /usr/include/sys/ipc.h /usr/include/bits/ipctypes.h
69 dev.o: /usr/include/bits/ipc.h /usr/include/sys/msg.h /usr/include/bits/msq.h
71 test_ipaddr.o: ipaddr.h
72 test_recv.o: dev.h /usr/include/unistd.h /usr/include/features.h
73 test_recv.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
74 test_recv.o: /usr/include/bits/posix_opt.h /usr/include/bits/types.h
75 test_recv.o: /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h
76 test_recv.o: /usr/include/bits/confname.h /usr/include/getopt.h
77 test_recv.o: /usr/include/fcntl.h /usr/include/bits/fcntl.h
78 test_recv.o: /usr/include/sys/types.h /usr/include/time.h
79 test_recv.o: /usr/include/endian.h /usr/include/bits/endian.h
80 test_recv.o: /usr/include/sys/select.h /usr/include/bits/select.h
81 test_recv.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
82 test_recv.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
83 test_recv.o: /usr/include/bits/sched.h /usr/include/sys/ipc.h
84 test_recv.o: /usr/include/bits/ipctypes.h /usr/include/bits/ipc.h
85 test_recv.o: /usr/include/sys/msg.h /usr/include/bits/msq.h
86 test_send.o: dev.h /usr/include/unistd.h /usr/include/features.h
87 test_send.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
88 test_send.o: /usr/include/bits/posix_opt.h /usr/include/bits/types.h
89 test_send.o: /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h
90 test_send.o: /usr/include/bits/confname.h /usr/include/getopt.h
91 test_send.o: /usr/include/fcntl.h /usr/include/bits/fcntl.h
92 test_send.o: /usr/include/sys/types.h /usr/include/time.h
93 test_send.o: /usr/include/endian.h /usr/include/bits/endian.h
94 test_send.o: /usr/include/sys/select.h /usr/include/bits/select.h
95 test_send.o: /usr/include/bits/sigset.h /usr/include/bits/time.h
96 test_send.o: /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
97 test_send.o: /usr/include/bits/sched.h /usr/include/sys/ipc.h
98 test_send.o: /usr/include/bits/ipctypes.h /usr/include/bits/ipc.h
99 test_send.o: /usr/include/sys/msg.h /usr/include/bits/msq.h