makefile

来自「小型操作系统,以VC为开发环境,需要boachs调试」· 代码 · 共 79 行

TXT
79
字号
#/***************************************************************************
#**     File name   : makefile	
#**     Author      : 
#**     Create date :
#**
#**	  Commants:
#**		he JCINX.kernel.drv's trap makefile
#**
#**     Revisions:
#**     $Log: MAKEFILE,v $
#**     Revision 1.2  2005/08/04 08:35:38  x.cheng
#**     new rule for tp1_/tp2_/tp3_/tp4_
#**         for new interrupt and exception handling method
#**
#**     Revision 1.1.1.1  2005/07/27 06:53:15  x.cheng
#**     add into repositories
#**
#**
#***************************************************************************/
#message:
#	@echo "开始编译 drv.trap 模块..."

MAKEFILE=makefile
MAKEDEP=$(MAKEFILE)

JCINX_INCLUDE	= ..\..\..\include
KERNEL_INC		= ..\..\inc
INC				= ..\inc

NASM	=nasm -f coff -dUNDERBARS=1 -i$(INCDIR)/
CC	=gcc -g -Wall -W -O2 -I$(JCINX_INCLUDE) -save-temps
LD	= ld
LDFLAGS	= -r -o 

#OBJS =traps.o hwISR1.o hwISR2.o
OBJS = tp1_exception.o traps.o  tp2_interrupt.o tp3_esr.o tp4_isr.o

# targets
all: ../trap.o

####################################################
# implicit rules
# rules...

%.o:%.c
	$(CC) -c -o$@ $<

%.o:%.asm
	$(NASM) $(NFLAGS) -o$@ $<

####################################################
#dependence...

tp1_exception.o: tp1_exception.asm $(INC)\def_int_exc.inc $(KERNEL_INC)\i386\exception.h	\
				$(MAKEDEP)

tp2_interrupt.o: tp2_interrupt.asm $(INC)\def_int_exc.inc $(KERNEL_INC)\i386\interrupt.h	\
				$(MAKEDEP)

tp3_esr.o: tp3_esr.c $(KERNEL_INC)\i386\exception.h	\
				$(MAKEDEP) 

tp4_isr.o: tp4_isr.c $(KERNEL_INC)\i386\interrupt.h	\
				$(MAKEDEP) 

traps.o: traps.c tp1_exception.asm tp2_interrupt.asm tp3_esr.c tp4_isr.c	\
		 $(INC)\def_int_exc.inc $(KERNEL_INC)\i386\exception.h $(KERNEL_INC)\i386\interrupt.h	\
		 $(MAKEDEP)

#	$(CC) -c -o traps.o traps.c
#hwISR1.o: hwISR1.asm
#	$(NASM) $(NFLAGS) -o hwISR1.o hwISR1.asm
#hwISR2.o: hwISR2.asm
#	$(NASM) $(NFLAGS) -o hwISR2.o hwISR2.asm

# explicit rules
../trap.o:	$(OBJS) $(MAKEDEP)
	$(LD) $(LDFLAGS) $@ $(OBJS)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?