Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b8fa822 authored by Yoshihiro YUNOMAE's avatar Yoshihiro YUNOMAE Committed by Rusty Russell
Browse files

tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace



pthread flag should not be -lpthread but -pthread using gcc. The -lpthread
links the external multithread library. On the other hand, the -pthread manages
both the gcc's preprocessor and linker to be able to compile with pthread.

Signed-off-by: default avatarYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 108fc825
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
CC = gcc
CFLAGS = -O2 -Wall
LFLAG = -lpthread
CFLAGS = -O2 -Wall -pthread

all: trace-agent

.c.o:
	$(CC) $(CFLAGS) $(LFLAG) -c $^ -o $@
	$(CC) $(CFLAGS) -c $^ -o $@

trace-agent: trace-agent.o trace-agent-ctl.o trace-agent-rw.o
	$(CC) $(CFLAGS) $(LFLAG) -o $@ $^
	$(CC) $(CFLAGS) -o $@ $^

clean:
	rm -f *.o trace-agent