Sunday, December 12, 2010

makefile of ThreadTest Program

[q.yang@localhost Sample_011_pThread_test]$ cat makefile
DESTDIR = ./debug
PROGRAM = $(DESTDIR)/ThreadTest
SRCDIR = ./
C = g++
OBJS := $(addprefix $(DESTDIR)/,task1.o)
DEBUG = -g
CFLAGS = -Wall $(DEBUG)

$(PROGRAM): $(OBJS)
$(C) -o $(PROGRAM) $(OBJS)

-lpthread



$(DESTDIR)/%.o:$(SRCDIR)/%.cpp
$(C) -c $(CFLAGS) $< -o $@ $(INCL)

clean :
rm -f $(OBJS)
rm -f $(PROGRAM)

No comments: