Kernel 0.5.9; New stable release after long time with lot of new features ! This...
[ZeXOS.git] / apps / openchess / src / makefile-zexos
blobd1d39af088fabd0e9d359540769c1f0541dba0e6
1 .SUFFIXES: .asm\r
2 \r
3 # defines\r
4 MAKEFILE=makefile-zexos\r
5 MAKEDEP=$(MAKEFILE)\r
6 NASM    =nasm -f elf\r
7 GLIBC   =../../../libc\r
8 LSCRIPT =./platform/zexos/link.ld\r
9 LFLAGS  =-g -T$(LSCRIPT)\r
10 INCDIR  =$(GLIBC)/include\r
11 CC      =gcc -m32 -g -O2 -Wall -c -nostdinc -fno-builtin -I$(INCDIR) -Iplatform/zexos\r
12 #-Wall -W\r
13 LD      =ld -m elf_i386 -s -nostdlib\r
14 LIBC    =$(GLIBC)/libc.a\r
15 OBJS    =platform/zexos/start.o main.o net.o client.o proto.o game.o rules.o\r
17 # targets\r
18 all: openchess\r
19         \r
20 install: openchess\r
21         mkdir mnt\r
22         mount /dev/fd0 mnt\r
23         cp -f openchess ./mnt/openchess\r
24         umount mnt\r
25         rmdir mnt\r
27 clean:\r
28         rm -f *.o openchess $(OBJS)\r
30 # implicit rules\r
31 .asm.o:\r
32         $(NASM) -o$@ $<\r
34 .c.o:\r
35         $(CC) -c -o$@ $<\r
37 #: dependencies\r
38 # init\r
39 platform/zexos/start.o:                 platform/zexos/start.asm        $(MAKEDEP)\r
40 # main\r
41 main.o:                                 main.c                          $(MAKEDEP)\r
42 net.o:                                  net.c                           $(MAKEDEP)\r
43 client.o:                               client.c                        $(MAKEDEP)\r
44 proto.o:                                proto.c                         $(MAKEDEP)\r
45 game.o:                                 game.c                          $(MAKEDEP)\r
46 rules.o:                                rules.c                         $(MAKEDEP)\r
48 # explicit rules\r
49 openchess: $(OBJS) $(LIBC) $(MAKEDEP)\r
50         $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)