?? makefile
字號:
SRC=dsr-module.c dsr-pkt.c dsr-dev.c dsr-io.c dsr-opt.c dsr-rreq.c dsr-rrep.c dsr-rerr.c dsr-ack.c dsr-srt.c send-buf.c debug.c neigh.c maint-buf.cNS_SRC=dsr-pkt.c dsr-io.c dsr-opt.c dsr-rreq.c dsr-rrep.c dsr-rerr.c dsr-ack.c dsr-srt.c send-buf.c neigh.c maint-buf.c link-cache.cNS_SRC_CPP=ns-agent.ccDEFS=-DDEBUG MODNAME=dsrRTC_TRG=linkcacheRTC_SRC=link-cache.cifneq (,$(findstring 2.6,$(KERNELRELEASE)))EXTRA_CFLAGS += -DKERNEL26 $(DEFS)obj-m += $(MODNAME).o $(MODNAME)-objs := $(SRC:%.c=%.o)obj-m += $(RTC_TRG).o$(RTC_TRG)-objs := $(RTC_SRC:%.c=%.o)clean-files := *~clean-dirs := .tmp_versionselseexport-objs := link-cache.oKOBJS := $(SRC:%.c=%.o)KERNEL=$(shell uname -r)KERNEL_DIR=/lib/modules/$(KERNEL)/buildKERNEL_INC=$(KERNEL_DIR)/includeCC=gccCXX=g++MIPS_CC=mipsel-linux-gccMIPS_LD=mipsel-linux-ld# NS2OBJS_NS=$(NS_SRC:%.c=%-ns.o)OBJS_NS_CPP=$(NS_SRC_CPP:%.cc=%-ns.o)NS_DEFS= # DON'T CHANGE (overridden by NS Makefile)# Set extra DEFINES here. Link layer feedback is now a runtime option.EXTRA_NS_DEFS=-DDEBUG# Note: OPTS is overridden by NS MakefileNS_CFLAGS=$(OPTS) $(CPP_OPTS) $(DEBUG) $(NS_DEFS) $(EXTRA_NS_DEFS)NS_INC= # DON'T CHANGE (overridden by NS Makefile)NS_TARGET=dsr-uu.o# Archiver and optionsAR=arAR_FLAGS=rc#######VERSION=$(shell if [ ! -d $(KERNEL_DIR) ]; then echo "No linux source found!!! Check your setup..."; exit; fi; grep ^VERSION $(KERNEL_DIR)/Makefile | cut -d' ' -f 3)PATCHLEVEL=$(shell grep ^PATCHLEVEL $(KERNEL_DIR)/Makefile | cut -d' ' -f 3)SUBLEVEL=$(shell grep ^SUBLEVEL $(KERNEL_DIR)/Makefile | cut -d' ' -f 3)#######KDEFS=-D__KERNEL__ -DMODULE $(DEFS) -DEXPORT_SYMTAB -DCONFIG_MODVERSIONS -DMODVERSIONS -include $(KERNEL_INC)/linux/modversions.h KINC=-nostdinc $(shell $(CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC)KCFLAGS=-Wall -fno-strict-aliasing -O2 $(KDEFS) $(KINC)MIPSDEFS=-mips2 -fno-pic -mno-abicalls -mlong-calls -G0 -msoft-float $(KDEFS)ifeq ($(PATCHLEVEL), 6)MODPREFIX=koelseMODPREFIX=oendif.PHONY: mips default depend clean ns clean-2.4 clean-2.6 indent# Check for kernel versionifeq ($(PATCHLEVEL),6)default: $(MODNAME).ko $(RTC_TRG).ko TODOclean: clean-2.6else # Assume kernel 2.4default: $(MODNAME).o $(RTC_TRG).o TODOclean: clean-2.4endifmips: @echo "Compiling for MIPS" $(MAKE) default CC=$(MIPS_CC) LD=$(MIPS_LD) KDEFS="$(MIPSDEFS)"$(MODNAME).ko: $(SRC) Makefile @echo "Compiling for $(PWD)" $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules$(RTC_TRG).ko: $(RTC_SRC) Makefile $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules$(KOBJS): %.o: %.c Makefile @echo "Compiling for $(PWD)" $(CC) $(KCFLAGS) -c -o $@ $<$(MODNAME).o: $(KOBJS) $(LD) -r $^ -o $@$(RTC_TRG).o: $(RTC_SRC) Makefile $(CC) $(KCFLAGS) -c -o $@ $<$(OBJS_NS_CPP): %-ns.o: %.cc Makefile $(CXX) $(NS_CFLAGS) $(NS_INC) -c -o $@ $<$(OBJS_NS): %-ns.o: %.c Makefile $(CXX) $(NS_CFLAGS) $(NS_INC) -c -o $@ $<$(NS_TARGET): endian.h $(OBJS_NS_CPP) $(OBJS_NS) *.h#$(AR) $(AR_FLAGS) $@ $(OBJS_NS_CPP) $(OBJS_NS) $(LD) -r -o $@ $(OBJS_NS_CPP) $(OBJS_NS) endian.h: endian.c $(CC) $(CFLAGS) -o endian endian.c ./endian > endian.hdepend: @echo "Updating Makefile dependencies..." @makedepend -Y./ -- $(DEFS) -- $(SRC) &>/dev/nullTODO: grep -n "TODO:" *.c *.h > TODO cat TODOTAGS: *.c *.h etags $(SRC) *.hindent: indent -kr -i8 -ts8 -sob -l80 -ss -ncs *.c *.hclean-2.6: @if [ -d $(KERNEL_DIR) ]; then \ $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) clean; \ fi rm -rf *~ *.o Makefile.bak TAGS TODO endian endian.h $(NS_TARGET)clean-2.4: rm -rf *~ *.o Makefile.bak TAGS TODO endian endian.h $(NS_TARGET)clean-ns: rm -rf Makefile.bak TAGS TODO endian endian.h $(OBJS_NS_CPP) $(OBJS_NS) *~ $(NS_TARGET)install: default mkdir -p /lib/modules/$(KERNEL)/dsr install -m 644 $(MODNAME).$(MODPREFIX) /lib/modules/$(KERNEL)/dsr/ install -m 644 $(RTC_TRG).$(MODPREFIX) /lib/modules/$(KERNEL)/dsr/ /sbin/depmod -auninstall: rm -rf /lib/modules/$(KERNEL)/dsr /sbin/depmod -aendif# DO NOT DELETEdsr-module.o: dsr.h dsr-pkt.h timer.h dsr-dev.h dsr-io.h debug.h neigh.hdsr-module.o: dsr-rreq.h maint-buf.h send-buf.h link-cache.h tbl.h list.hdsr-pkt.o: dsr-opt.h dsr.h dsr-pkt.h timer.hdsr-dev.o: debug.h dsr.h dsr-pkt.h timer.h neigh.h dsr-opt.h dsr-rreq.hdsr-dev.o: link-cache.h tbl.h list.h dsr-srt.h dsr-ack.h send-buf.hdsr-dev.o: maint-buf.h dsr-io.hdsr-io.o: dsr-dev.h dsr.h dsr-pkt.h timer.h dsr-rreq.h dsr-rrep.h dsr-srt.hdsr-io.o: debug.h dsr-ack.h dsr-rtc.h maint-buf.h neigh.h dsr-opt.hdsr-io.o: link-cache.h tbl.h list.h send-buf.hdsr-opt.o: debug.h dsr.h dsr-pkt.h timer.h dsr-opt.h dsr-rreq.h dsr-rrep.hdsr-opt.o: dsr-srt.h dsr-rerr.h dsr-ack.hdsr-rreq.o: debug.h dsr.h dsr-pkt.h timer.h tbl.h list.h dsr-rrep.h dsr-srt.hdsr-rreq.o: dsr-rreq.h dsr-opt.h link-cache.h send-buf.h neigh.hdsr-rrep.o: dsr.h dsr-pkt.h timer.h debug.h tbl.h list.h dsr-rrep.h dsr-srt.hdsr-rrep.o: dsr-rreq.h dsr-opt.h link-cache.h send-buf.hdsr-rerr.o: dsr.h dsr-pkt.h timer.h dsr-rerr.h dsr-opt.h debug.h dsr-srt.hdsr-rerr.o: dsr-ack.h link-cache.h tbl.h list.h maint-buf.hdsr-ack.o: tbl.h list.h debug.h dsr-opt.h dsr.h dsr-pkt.h timer.h dsr-ack.hdsr-ack.o: link-cache.h neigh.h maint-buf.hdsr-srt.o: dsr.h dsr-pkt.h timer.h dsr-srt.h debug.h dsr-opt.h dsr-ack.hdsr-srt.o: link-cache.h tbl.h list.h neigh.h dsr-rrep.hsend-buf.o: tbl.h list.h send-buf.h dsr.h dsr-pkt.h timer.h debug.hsend-buf.o: link-cache.h dsr-srt.hdebug.o: debug.h dsr.h dsr-pkt.h timer.hneigh.o: tbl.h list.h neigh.h dsr.h dsr-pkt.h timer.h debug.hmaint-buf.o: dsr.h dsr-pkt.h timer.h debug.h tbl.h list.h neigh.h dsr-ack.hmaint-buf.o: link-cache.h dsr-rerr.h dsr-dev.h maint-buf.h
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -