System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / apps / trigame / Makefile
blobd9a14e5ee8786a22f160108f42dfd2c070c80126
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 -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: trigame
20 install: trigame
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f trigame ./mnt/trigame
24 umount mnt
25 rmdir mnt
27 clean:
28 rm -f *.o trigame $(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 trigame: $(OBJS) $(LIBC) $(MAKEDEP)
45 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)