New developer version 0.6.8; added select () function; added demonstrating example...
[ZeXOS.git] / apps / mserver / Makefile
blob807548dc2f6fe476c0e3c4eda18215683fa8e76d
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
17 # targets
18 all: mserver
20 install: mserver
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f mserver ./mnt/mserver
24 umount mnt
25 rmdir mnt
27 iso: mserver
28 cp mserver ../../iso/
30 clean:
31 rm -f *.o mserver mserver.img $(OBJS)
33 # implicit rules
34 .s.o:
35 $(NASM) -o$@ $<
37 .c.o:
38 $(CC) -c -o$@ $<
40 # explicit rules
41 mserver: $(OBJS) $(LIBC) $(MAKEDEP)
42 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)