System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / libipc / Makefile
blob0a96f95ba261578ee08ee8356107964443cc08f2
1 .SUFFIXES: .asm
3 # defines
4 MAKEFILE=Makefile
5 MAKEDEP=$(MAKEFILE)
6 LIBC =../libc
7 INCDIR =./include
8 NASM =nasm -f elf -i$(INCDIR)/
9 CC =gcc -m32 -g -Wall -W -O2 -nostdinc -fno-builtin -I$(INCDIR) -I$(LIBC)/include
11 OBJS =create.o open.o send.o recv.o close.o accept.o
13 ifneq ($(V),1)
14 Q := @
15 endif
17 # targets
18 all: libipc.a
20 clean:
21 $(Q)rm -f libipc.a $(OBJS)
22 @printf " CLEAN\n";
24 # implicit rules
25 .asm.o:
26 @printf " ASM $(subst $(shell pwd)/,,$(@))\n";
27 $(Q)$(NASM) -o$@ $<
29 .c.o:
30 @printf " CC $(subst $(shell pwd)/,,$(@))\n";
31 $(Q)$(CC) -c -o$@ $<
33 # dependencies
34 create.o: create.c $(MAKEDEP)
35 open.o: open.c $(MAKEDEP)
36 send.o: send.c $(MAKEDEP)
37 recv.o: recv.c $(MAKEDEP)
38 close.o: close.c $(MAKEDEP)
39 accept.o: accept.c $(MAKEDEP)
41 # explicit rules
42 libipc.a: $(OBJS) $(MAKEDEP)
43 @printf " AR $(subst $(shell pwd)/,,$(@))\n";
44 $(Q)ar rcs libipc.a $(OBJS)