System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / apps / wm / Makefile
blob4b81435eef8e9b88586d035789059ad98e699be4
1 .SUFFIXES: .asm
3 # defines
4 MAKEFILE=Makefile
5 MAKEDEP=$(MAKEFILE)
6 NASM =nasm -f elf
7 GLIBC =../../libc
8 LIBXDIR =../../libx
9 LIBTDIR =../../libpthread
10 LSCRIPT =./link.ld
11 LFLAGS =-g -T$(LSCRIPT)
12 INCDIR =$(GLIBC)/include
13 CC =gcc -m32 -g -O2 -Wall -W -c -nostdinc -fno-builtin -fno-stack-protector -I$(INCDIR) -I$(LIBXDIR) -I$(LIBTDIR)/include
14 #-Wall -W
15 LD =ld -m elf_i386 -s -nostdlib
16 LIBC =$(GLIBC)/libc.a
17 LIBX =$(LIBXDIR)/libx.a
18 LIBT =$(LIBTDIR)/libpthread.a
19 OBJS =start.o main.o window.o cursor.o button.o menu.o dialog.o filemanager.o config.o terminal.o authors.o taskbar.o tview.o
21 # targets
22 all: wm
24 install: wm
25 mkdir mnt
26 mount /dev/fd0 mnt
27 cp -f wm ./mnt/wm
28 cp -f README ./mnt/README
29 cp -f config ./mnt/config
30 cp -f folder ./mnt/folder
31 cp -f file ./mnt/file
32 umount mnt
33 rmdir mnt
35 clean:
36 rm -f *.o wm $(OBJS)
37 # implicit rules
38 .asm.o:
39 $(NASM) -o$@ $<
41 .c.o:
42 $(CC) -c -o$@ $<
44 #: dependencies
45 # boot
46 start.o: start.asm $(MAKEDEP)
47 # kernel
48 main.o: main.c $(MAKEDEP)
49 window.o: window.c $(MAKEDEP)
50 cursor.o: cursor.c $(MAKEDEP)
51 button.o: button.c $(MAKEDEP)
52 menu.o: menu.c $(MAKEDEP)
53 dialog.o: dialog.c $(MAKEDEP)
54 filemanager.o: filemanager.c $(MAKEDEP)
55 config.o: config.c $(MAKEDEP)
56 terminal.o: terminal.c $(MAKEDEP)
57 authors.o: authors.c $(MAKEDEP)
58 taskbar.o: taskbar.c $(MAKEDEP)
59 tview.o: tview.c $(MAKEDEP)
61 # explicit rules
62 wm: $(OBJS) $(LIBT) $(LIBX) $(LIBC) $(MAKEDEP)
63 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBT) $(LIBX) $(LIBC)