System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / apps / webcl / Makefile
blobefb4814ec3fbbb46176da36b5f7ae9b6065c11fd
1 .SUFFIXES: .asm
3 # defines
4 MAKEFILE=Makefile
5 MAKEDEP=$(MAKEFILE)
6 NASM =nasm -f elf
7 GLIBC =../../libc
8 LSCRIPT =./link.ld
9 LFLAGS =-g -T$(LSCRIPT)
10 INCDIR =$(GLIBC)/include
11 CC =gcc -m32 -g -O2 -Wall -W -c -nostdinc -fno-builtin -fno-stack-protector -I$(INCDIR)
12 #-Wall -W
13 LD =ld -m elf_i386 -s -nostdlib
14 LIBC =$(GLIBC)/libc.a
15 OBJS =start.o main.o net.o http.o
17 # targets
18 all: webcl
20 install: webcl
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f webcl ./mnt/webcl
24 umount mnt
25 rmdir mnt
27 clean:
28 rm -f *.o webcl webcl.img $(OBJS)
29 # implicit rules
30 .asm.o:
31 $(NASM) -o$@ $<
33 .c.o:
34 $(CC) -c -o$@ $<
36 #: dependencies
37 # boot
38 start.o: start.asm $(MAKEDEP)
39 # core
40 main.o: main.c $(MAKEDEP)
41 http.o: http.c $(MAKEDEP)
43 # explicit rules
44 webcl: $(OBJS) $(LIBC) $(MAKEDEP)
45 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)