typo
[lnanohttp.git] / ulinux / patterns / thread / makefile
blobd8118073f7919e08e92fac7ab896e93d86d54244
1 .PHONY:clean
3 #does remove some useless ELF sections
4 OPTIM=-fno-stack-protector -fno-asynchronous-unwind-tables -fno-dwarf2-cfi-asm \
5 -Ofast -march=native
7 ARCH?=$(shell uname -m | sed -e s/i.86/x86/ -e s/parisc64/parisc/ \
8 -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/sh.*/sh/)
10 thread:thread.c ../../../ulinux/arch
11 cpp -Wall -Wextra -I../../.. thread.c -o cpp_thread.c
12 gcc -Wall -Wextra -std=gnu99 $(OPTIM) -c cpp_thread.c -o thread.o
13 ld -O -nostdlib -Bstatic --strip-all thread.o \
14 $$(gcc -print-libgcc-file-name) --output thread
16 ../../../ulinux/arch:
17 ln -s archs/$(ARCH) ../../../ulinux/arch
19 clean:
20 -rm -f ../../../ulinux/arch
21 -rm -f cpp_thread.c thread.s thread.o thread