Version 0.6.7: Added support for hostname - hostname_get (), hostname_set (); Hostnam...
[ZeXOS.git] / apps / zmail / Makefile
blobfcc8ddaddfc29af678c731651e57c4e121df4b0b
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: zmail
20 install: zmail
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f zmail ./mnt/zmail
24 umount mnt
25 rmdir mnt
27 clean:
28 rm -f *.o zmail zmail.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 # kernel
40 main.o: main.c $(MAKEDEP)
43 # explicit rules
44 zmail: $(OBJS) $(LIBC) $(MAKEDEP)
45 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)