📄 mconfig
字号:
# Copyright (C) 1999-2002 Konstantin Boldyshev <konst@linuxassembly.org>## MCONFIG -- asmutils configuration stuff## $Id: MCONFIG,v 1.19 2002/03/14 17:42:46 konst Exp $#---------------------------------------------------------------------------## CONFIGURATION PARAMETERS#---------------------------------------------------------------------------## Target operating system. Valid values are:# LINUX FREEBSD OPENBSD NETBSD SOLARIS UNIXWARE BEOS ATHEOSOS = LINUX# Kernel version of target OS (1.2 = 12, 2.4 = 24, 3.6 = 36, etc)KERNEL = 24# Optimization method (SIZE/SPEED)OPTIMIZE = SIZE# System call convention (KERNEL/LIBC)SYSCALL = KERNEL# Target executable format (ELF/AOUT)EXECUTABLE = ELF# Use hacked ELF for smaller binaries (when possible)# Disable if you have trouble running resulting executables.ELF_MACROS = y# Enable debug build#DEBUG = y# Write version stamp into executables#STAMP = y# Use custom startup code# Enable along with SYSCALL=LIBC if gcc fails with -nostartfiles# (when linker can't find some external symbols required by libc);# you may also need this with OS=BEOS.#STARTUP = y#---------------------------------------------------------------## DO NOT EDIT BELOW ##---------------------------------------------------------------#VERSION = 0.17${OS} = y## force reasonable defaults for some OSes#ifdef OPENBSDEXECUTABLE = AOUTendif#ifdef NETBSD#ifneq ($(KERNEL),15)#EXECUTABLE = AOUT#else#EXECUTABLE = ELF#endif#endififdef BEOSSTARTUP = yELF_MACROS =endif#${EXECUTABLE} = yAS := nasmLD := ldCC := gccMAKE := gmakeASVER := $(shell $(AS) -r | cut -d ' ' -f 3)#LDVER := $(shell $(LD) -v | cut -d ' ' -f 4)CORRECT_ASVER = 0.98.28## avoid using asmutils during the build process if PATH has '.'#MKDIR := $(shell which mkdir) -pCHMOD := $(shell which chmod) +xLN := $(shell which ln) -sRM := $(shell which rm) -fCP := $(shell which cp)ifdef LINUXCP += -aelseCP += -RpendifINSTALLDIR=../bin/$(OS)-$(KERNEL)LDFLAGS :=ASFLAGS := -w+orphan-labels -w+macro-params -i../inc/DEFINES := -D__$(OS)__ -D__KERNEL__=$(KERNEL) -D__SYSCALL__=__S_$(SYSCALL)__\ -D__OPTIMIZE__=__O_$(OPTIMIZE)__ -D__$(EXECUTABLE)__ifeq ($(SYSCALL),LIBC)LD = gccELF_MACROS =ifndef STARTUPLDFLAGS = -nostartfilesendifendififdef DEBUGASFLAGS += -gELF_MACROS =DEFINES += -DDEBUGendififdef BUILD_LIBELF_MACROS =endififdef STARTUPDEFINES += -D__STARTUP__endififdef STAMPDEFINES += -DSTAMP_VERSION="'asmutils $(VERSION)'" -DSTAMP_DATE="'$(shell date "+%d-%b-%Y %H:%M")'"endififndef ELFELF_MACROS =endif#ifdef ELF_MACROSASFLAGS += -f binDEFINES += -D__ELF_MACROS__%: %.asm $(AS) $(ASFLAGS) $(DEFINES) $< $(CHMOD) $*elseifdef AOUTASFLAGS += -f aoutbSTRIP = stripifdef BUILD_SRCLDFLAGS += -e _startendifelseASFLAGS += -f elfifndef DEBUGLDFLAGS += -sendifSTRIP = strip -R .note -R .comment#STRIP = sstripendif%.o: %.asm $(AS) $(ASFLAGS) $(DEFINES) $<%: %.o $(LD) $(LDFLAGS) -o $* $<ifndef DEBUG $(STRIP) $*endifendif # ELF_MACROS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -