| 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 = cleanup.o condvar.o critical-section.o cxx-exit.o \ |
| 8 |
job-queue1.o job-queue2.o job-queue3.o spin-condvar.o |
| 9 |
LIBRARIES = |
| 10 |
PROGRAMS = detached primes thread-create thread-create2 \ |
| 11 |
thread-pid tsd |
| 12 |
|
| 13 |
# Link programs with the pthread library. |
| 14 |
LDLIBS += -lpthread |
| 15 |
|
| 16 |
.PHONY: all clean |
| 17 |
|
| 18 |
# Default target: build everything. |
| 19 |
all: $(OBJECTS) $(LIBRARIES) $(PROGRAMS) |
| 20 |
|
| 21 |
# Clean up build products. |
| 22 |
clean: |
| 23 |
rm -f *.o *.a $(PROGRAMS) |