📄 makefile
字号:
gcc_ok = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ then echo $(1); else echo $(2); fi)M32 := $(call gcc_ok,-m32,)ALIGN := $(call gcc_ok,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)CC = gccCFLAGS = $(M32) -funsigned-char -g -W -Wall -march=i386 $(ALIGN) -OsAR = arAS = asLD = ld -m elf_i386OBJCOPY = objcopyRANLIB = ranlibLIBMENU = main.o16 biosio.o16 string.o16 menu.o16 syslinux.o16 heap.o16MENUS = simple.com complex.com.SUFFIXES: .c .s .s16 .o16 .elf .com.c.s: $(CC) $(CFLAGS) -MMD -S -o $@ $<.s.s16: echo '.code16gcc' | cat - $< > $@.s16.o16: $(AS) -o $@ $<.elf.com: $(OBJCOPY) -O binary $< $@%.elf: %.o16 startup.o16 com16.ld libmenu.a $(LD) -T com16.ld -o $@ startup.o16 $< libmenu.aall : $(MENUS)startup.s16: startup.S16 $(CC) $(CFLAGS) -x assembler-with-cpp -E -o $@ $<libmenu.a: $(LIBMENU) -rm -f $@ $(AR) cq $@ $^ $(RANLIB) $@clean: -rm -f *.s *.s16 *.o16 *.elf *.com *.a *.dspotless: clean -rm -f *~ \#* .\#*-include *.d
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -