📄 dj.mak
字号:
# defines
MAKEFILE=dj.mak
# uncomment the next line to rebuild everything if this makefile changes
#MAKEDEP=$(MAKEFILE)
INCDIR =../inc
CFLAGS =-g -Wall -W -O2 -I$(INCDIR) -fno-builtin -nostdinc
# chose ELF, COFF, or PE in the next line
AFLAGS =-f coff -dUNDERBARS=1 -i$(INCDIR)/
CTYPE =ctype/ctype.o
SETJMP =setjmp/setjmp.o setjmp/longjmp.o
STDIO =stdio/printf.o stdio/sprintf.o stdio/doprintf.o \
stdio/vprintf.o stdio/vsprintf.o stdio/stdio.o \
stdio/fputc.o stdio/fflush.o stdio/setbuf.o
STDLIB =stdlib/rand.o stdlib/srand.o
STRING =string/memcmp.o string/memset.o string/memcpy.o \
string/strlen.o string/movedata.o string/memsetw.o \
string/memmove.o
SYS =os/sleep.o os/write.o os/read.o os/ioctl.o \
os/time.o os/select.o os/sbrk.o
X86 =x86/disable.o x86/enable.o x86/critb.o x86/crite.o \
x86/outportb.o x86/inportb.o x86/peekb.o x86/pokeb.o \
x86/pokew.o x86/peekl.o x86/pokel.o x86/fmemsetw.o
OBJS =$(CTYPE) $(SETJMP) $(STDIO) $(STDLIB) $(STRING) $(SYS) $(X86)
# implicit rules
.c.o:
gcc $(CFLAGS) -c -o$@ $<
# targets
all: libc.a
clean:
del libc.a
# deltree /y $(OBJS) # command line is too long. Got 'sed'?
dir /s /b *.o | sed -e s/"^"/"del "/g >delobj.bat
delobj.bat
del delobj.bat
# dependencies
ctype/ctype.o: ctype/ctype.c $(MAKEDEP)
#
setjmp/setjmp.o: setjmp/setjmp.c $(MAKEDEP)
setjmp/longjmp.o: setjmp/longjmp.c $(MAKEDEP)
#
stdio/printf.o: stdio/printf.c $(MAKEDEP)
stdio/sprintf.o: stdio/sprintf.c $(MAKEDEP)
stdio/doprintf.o: stdio/doprintf.c $(MAKEDEP)
stdio/vprintf.o: stdio/vprintf.c $(MAKEDEP)
stdio/vsprintf.o: stdio/vsprintf.c $(MAKEDEP)
stdio/stdio.o: stdio/stdio.c $(MAKEDEP)
stdio/fputc.o: stdio/fputc.c $(MAKEDEP)
stdio/fflush.o: stdio/fflush.c $(MAKEDEP)
stdio/setbuf.o: stdio/setbuf.c $(MAKEDEP)
#
stdlib/rand.o: stdlib/rand.c $(MAKEDEP)
stdlib/srand.o: stdlib/srand.c $(MAKEDEP)
#
string/memcmp.o: string/memcmp.c $(MAKEDEP)
string/memset.o: string/memset.c $(MAKEDEP)
string/memcpy.o: string/memcpy.c $(MAKEDEP)
string/strlen.o: string/strlen.c $(MAKEDEP)
string/movedata.o: string/movedata.c $(MAKEDEP)
#
os/getch.o: os/getch.c $(MAKEDEP)
os/sleep.o: os/sleep.c $(MAKEDEP)
os/write.o: os/write.c $(MAKEDEP)
os/time.o: os/time.c $(MAKEDEP)
os/ioctl.o: os/ioctl.c $(MAKEDEP)
os/select.o: os/select.c $(MAKEDEP)
os/sbrk.o: os/sbrk.c $(MAKEDEP)
#
x86/disable.o: x86/disable.c $(MAKEDEP)
x86/enable.o: x86/enable.c $(MAKEDEP)
x86/critb.o: x86/critb.c $(MAKEDEP)
x86/crite.o: x86/crite.c $(MAKEDEP)
x86/outportb.o: x86/outportb.c $(MAKEDEP)
x86/inportb.o: x86/inportb.c $(MAKEDEP)
x86/peekb.o: x86/peekb.c $(MAKEDEP)
x86/pokeb.o: x86/pokeb.c $(MAKEDEP)
x86/pokew.o: x86/pokew.c $(MAKEDEP)
x86/fmemsetw.o: x86/fmemsetw.c $(MAKEDEP)
# explicit rules
libc.a: $(OBJS) $(MAKEDEP)
ar rcs libc.a $(OBJS)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -