?? makefile
字號:
CFLAGS=-MPROG1=test1PROG2=measure## a generic makefile for sample use ... feel free to customize# # Programs using this must define:# PROG name of program (eg. grep)# (PROG1/PROG2 etc.. can be used for more than 1 program## Programs using this may define: defaults# OBJS list of object file names. $(PROG).o# USAGEFILE where usage message is kept $(PROG).c# INCPATH extra include directories# LIBPATH extra library directory# DEBUG set the debug flag -g1## PRIV privity to link program at. nil# STACKSIZE32 stack requirement for 32-bit program 32k# LIBS extra libraries nil## CFLAGS compiler flags (generic) -O1 -M# CC386 386 compiler to invoke cc -3 -mf# CC386FLAGS 386 compiler flags.VPATH=$(shell pwd)ifndef OBJS1 OBJS1= $(PROG1).oendififndef OBJS2 OBJS2= $(PROG2).oendififndef OBJS3 OBJS3= $(PROG3).oendififndef USAGEFILE1 USAGEFILE1= $(PROG1).cendififndef USAGEFILE2 USAGEFILE2= $(PROG2).cendififndef USAGEFILE3 USAGEFILE3= $(PROG3).cendififndef DEBUG DEBUG = -gendififdef PRIV LDFLAGS += $(PRIV)endififdef DEFS CFLAGS += $(DEFS)endififndef STACKSIZE32 STACKSIZE32 = -N32kendififdef CODEGEN CFLAGS += $(CODEGEN)else CFLAGS += -O1 -M -w9endififndef CC386 CC386 = cc -3 endififdef INCPATHCFLAGS += -I$(INCPATH)endififndef LIBPATH LIBPATH= endifLDFLAGS = QNXLDFLAGS = $(LIBPATH) $(LDFLAGS)$(PROG1): $(OBJS1) $(CC386) -T1 $(DEBUG) $(QNXLDFLAGS) $(LIBS) $(STACKSIZE32) -o $@ $^ usemsg $@ $(USAGEFILE1)$(PROG2): $(OBJS2) $(CC386) -T1 $(DEBUG) $(QNXLDFLAGS) $(LIBS) $(STACKSIZE32) -o $@ $^ usemsg $@ $(USAGEFILE2)$(PROG3): $(OBJS3) $(CC386) $(DEBUG) $(QNXLDFLAGS) $(LIBS) $(STACKSIZE32) -o $@ $^ usemsg $@ $(USAGEFILE3)%.o: %.c $(CC386) $(DEBUG) -c -o $@ $(CFLAGS) $(CC386FLAGS) $^clean: -rm $(PROG1) $(PROG2) $(PROG3) $(OBJS1) $(OBJS2) $(OBJS3)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -