System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / libpthread / Makefile
blob4ba9f8a4751f90ecaf26e9b924f56f29e487df02
1 .SUFFIXES: .asm
3 # defines
4 MAKEFILE=Makefile
5 MAKEDEP=$(MAKEFILE)
6 INCDIR =./include
7 NASM =nasm -f elf -i$(INCDIR)/
8 CC =gcc -m32 -g -Wall -W -O2 -nostdinc -fno-builtin -I$(INCDIR)
10 OBJS =create.o destroy.o
12 ifneq ($(V),1)
13 Q := @
14 endif
16 # targets
17 all: libpthread.a
19 clean:
20 $(Q)rm -f libpthread.a $(OBJS)
21 @printf " CLEAN\n";
23 # implicit rules
24 .asm.o:
25 @printf " ASM $(subst $(shell pwd)/,,$(@))\n";
26 $(Q)$(NASM) -o$@ $<
28 .c.o:
29 @printf " CC $(subst $(shell pwd)/,,$(@))\n";
30 $(Q)$(CC) -c -o$@ $<
32 # dependencies
33 create.o: create.c $(MAKEDEP)
34 destroy.o: destroy.c $(MAKEDEP)
36 # explicit rules
37 libpthread.a: $(OBJS) $(MAKEDEP)
38 @printf " AR $(subst $(shell pwd)/,,$(@))\n";
39 $(Q)ar rcs libpthread.a $(OBJS)