Debian Codegraph @

listings/appendix-a/Makefile

raw
1 ########################################################################
2 # Code listing from "Advanced Linux Programming," by CodeSourcery LLC #
3 # Copyright (C) 2001 by New Riders Publishing #
4 # See COPYRIGHT for license information. #
5 ########################################################################
6
7 OBJECTS =
8 LIBRARIES =
9 PROGRAMS = calculator hello malloc-use
10
11 .PHONY: all clean
12
13 # Default target: build everything.
14 all: $(OBJECTS) $(LIBRARIES) $(PROGRAMS)
15
16 # Clean up build products.
17 clean:
18 rm -f *.o *.a $(PROGRAMS)
19
20 # Additional dependencies.
21 calculator.o stack.o number.o: \
22 CFLAGS += -pg
23
24 calculator: LDFLAGS += -pg
25 calculator: calculator.o stack.o number.o
26