Fixed buffer overflow in mserver; fixed type of checkinfo () 2nd parameter; memory
[ZeXOS.git] / apps / tutorial / Makefile
blobdf18ad3a1805f9f4f4a8a26ada42f5be5d472615
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: tutorial
20 install: tutorial
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f tutorial ./mnt/tutorial
24 umount mnt
25 rmdir mnt
27 iso: tutorial
28 cp tutorial ../../iso/
30 clean:
31 rm -f *.o tutorial tutorial.img $(OBJS)
32 # implicit rules
33 .s.o:
34 $(NASM) -o$@ $<
36 .c.o:
37 $(CC) -c -o$@ $<
39 # explicit rules
40 tutorial: $(OBJS) $(LIBC) $(MAKEDEP)
41 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)