Small improvements in build process - dont compile graphical code when not used
[ZeXOS.git] / apps / webcl / Makefile
bloba7715d1d20e750b76d37fa7484a0a253c7322773
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 net.o http.o
17 # targets
18 all: webcl
20 linux:
21 gcc -owebcl_linux main.c net.c http.c -DLINUX
23 install: webcl
24 mkdir mnt
25 mount /dev/fd0 mnt
26 cp -f webcl ./mnt/webcl
27 umount mnt
28 rmdir mnt
30 iso: webcl
31 cp webcl ../../iso/
33 clean:
34 rm -f *.o webcl webcl.img $(OBJS)
35 # implicit rules
36 .asm.o:
37 $(NASM) -o$@ $<
39 .c.o:
40 $(CC) -c -o$@ $<
42 #: dependencies
43 # boot
44 start.o: start.asm $(MAKEDEP)
45 # core
46 main.o: main.c $(MAKEDEP)
47 http.o: http.c $(MAKEDEP)
49 # explicit rules
50 webcl: $(OBJS) $(LIBC) $(MAKEDEP)
51 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)