Cleanup in elf.c with .bss section clean; adm command mounts cdrom instead of floppy...
[ZeXOS.git] / apps / telnetd / Makefile
blobecd5a9b1ec29f382ff1c241bedf9fc764e0c37ab
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 iso: telnetd
28 cp telnetd ../../iso/
30 clean:
31 rm -f *.o telnetd.img telnetd $(OBJS)
33 # implicit rules
34 .s.o:
35 $(NASM) -o$@ $<
37 .c.o:
38 $(CC) -c -o$@ $<
40 # explicit rules
41 telnetd: $(OBJS) $(LIBC) $(MAKEDEP)
42 $(LD) $(LFLAGS) -o$@ $(OBJS) $(LIBC)