* Christmas edition *; fixed irc /os command; small cleanup in fd.c; improvements...
[ZeXOS.git] / apps / telnetd / Makefile
blob3da59183bdbc66e45816d46ec2a07f1ac41846f4
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 console.o
17 # targets
18 all: telnetd
20 install: telnetd
21 mkdir mnt
22 mount /dev/fd0 mnt
23 cp -f telnetd ./mnt/telnetd
24 umount mnt
25 rmdir mnt
27 clean:
28 rm -f *.o telnetd $(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)
41 net.o: net.c $(MAKEDEP)
42 console.o: console.c $(MAKEDEP)
44 # explicit rules
45 telnetd: $(OBJS) $(LIBC) $(MAKEDEP)
46 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)