Я видел данные два make-файла следующим образом:
all: thread1 thread2 thread3
CFLAGS=-I/usr/include/nptl -D_REENTRANT
LDFLAGS=-L/usr/lib/nptl -lpthread
clean:
rm -f thread1 thread2 thread3
######################
all: thread1 thread2 thread3
CFLAGS=-D_REENTRANT
LDFLAGS=-lpthread
clean:
rm -f thread1 thread2 thread3
Как правильно без использования makefile скомпилировать thread1.c с помощью gcc?
gcc -o thread1 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread thread1.c
-I
и-L
или нет? Это не то, что кто-либо здесь может ответить за вас. - person Carl Norum   schedule 05.07.2011