makefile
来自「gameboy 模拟器的源代码」· 代码 · 共 101 行
TXT
101 行
## Makefile## thinlib library makefile## Copyright (C) 2001 Matthew Conte (matt@conte.com)## $Id: $################################# ConfigurationCFLAGS = -W -Wall -WerrorDBGCFLAGS = -ggdb -DTHINLIB_DEBUGOPTCFLAGS = -O3 -fomit-frame-pointer -ffast-math# AssemblerASM = nasmASMFLAGS = -f coffDBGASMFLAGS = -g################################# WANT_DEBUG = TRUE################################ifeq "$(WANT_DEBUG)" "TRUE" CFLAGS += $(DBGCFLAGS) ASMFLAGS += $(DBGASMFLAGS)else CFLAGS += $(OPTCFLAGS)endif################################CFILES = tl_main tl_log tl_timer tl_int tl_key tl_mouse tl_joy \ tl_dpp tl_bmp tl_vesa tl_vga tl_video tl_sb tl_sound \ tl_event tl_profCSRCS = $(addsuffix .c, $(CFILES))OBJS = $(addsuffix .o, $(CFILES))################################.PHONY = all dep cleanall: libthin.a thintest.execlean: rm -f libthin.a thintest.exe $(OBJS) _depthintest.exe: thintest.cpp libthin.a $(CXX) -o $@ thintest.cpp -L. -lthinlibthin.a: $(OBJS) rm -f $@ ar scru $@ $(OBJS)dep: rmdep _dep################################rmdep: @rm -f _dep @echo "# dep file" > _depifneq "$(CSRCS)" "" @$(foreach .a, $(CSRCS), $(CC) $(CFLAGS) -MM $(.a) >> _dep;)endififneq "$(ASMSRCS)" "" @$(foreach .a, $(ASMSRCS), $(ASM) $(ASMFLAGS) -M $(.a) >> _dep;)endif_dep:# this is done so that we don't get all the no such file warnings @echo "# dep file" > _depifneq "$(CSRCS)" "" @$(foreach .a, $(CSRCS), $(CC) $(CFLAGS) -MM $(.a) >> _dep;)endififneq "$(ASMSRCS)" "" @$(foreach .a, $(ASMSRCS), $(ASM) $(ASMFLAGS) -M $(.a) >> _dep;)endifinclude _dep################################%.o: %.cpp $(CXX) $(CFLAGS) -o $@ -c $<%.o: %.c $(CC) $(CFLAGS) -o $@ -c $<%.o: %.asm $(ASM) $(ASMFLAGS) -o $@ $<################################# $Log: $
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?