New developer version 0.6.8; added select () function; added demonstrating example...
[ZeXOS.git] / apps / imgshow / Makefile
blobd169ce7de96e2c148362cb1cf899d59661c37a48
1 .SUFFIXES: .asm
3 # defines
4 MAKEFILE=Makefile
5 MAKEDEP=$(MAKEFILE)
6 NASM =nasm -f elf
7 GLIBC =../../libc
8 LIBXDIR =../../libx
9 LSCRIPT =./link.ld
10 LFLAGS =-g -T$(LSCRIPT)
11 INCDIR =$(GLIBC)/include
12 CC =gcc -m32 -g -O2 -Wall -W -c -nostdinc -fno-builtin -fno-stack-protector -I$(INCDIR) -I$(LIBXDIR)
13 #-Wall -W
14 LD =ld -m elf_i386 -s -nostdlib
15 LIBC =$(GLIBC)/libc.a
16 LIBX =$(LIBXDIR)/libx.a
17 OBJS =start.o main.o
19 # targets
20 all: imgshow
22 install: imgshow
23 mkdir mnt
24 mount /dev/fd0 mnt
25 cp -f imgshow ./mnt/imgshow
26 cp -f rocket ./mnt/rocket
27 umount mnt
28 rmdir mnt
30 iso: imgshow
31 cp imgshow ../../iso/
32 cp rocket ../../iso/
34 clean:
35 rm -f *.o imgshow imgshow.img $(OBJS)
37 # implicit rules
38 .s.o:
39 $(NASM) -o$@ $<
41 .c.o:
42 $(CC) -c -o$@ $<
44 # explicit rules
45 imgshow: $(OBJS) $(LIBC) $(MAKEDEP)
46 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBX) $(LIBC)