System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / apps / websrv / Makefile
bloba6f8fe3e8fd76f8178141cf63ccd83c563db8dbd
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: websrv
20 install: websrv
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f websrv ./mnt/websrv
24 cp -f html ./mnt/html
25 umount mnt
26 rmdir mnt
28 clean:
29 rm -f *.o websrv websrv.img $(OBJS)
30 # implicit rules
31 .asm.o:
32 $(NASM) -o$@ $<
34 .c.o:
35 $(CC) -c -o$@ $<
37 #: dependencies
38 # boot
39 start.o: start.asm $(MAKEDEP)
40 # kernel
41 main.o: main.c $(MAKEDEP)
42 net.o: net.c $(MAKEDEP)
43 http.o: http.c $(MAKEDEP)
45 # explicit rules
46 websrv: $(OBJS) $(LIBC) $(MAKEDEP)
47 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)