?? makefile
字號:
##################################### # # Generic makefile # # by Coon Xu # email: coonxu@126.com# # Copyright (c) 2005 Coon Xu# All rights reserved. # # No warranty, no liability; # you use this at your own risk. # # You are free to modify and # distribute this without giving # credit to the original author. # ###################################### #source file#源文件,自動找所有.c和.cpp文件,并將目標定義為同名.o文件SOURCE := $(wildcard *.c) $(wildcard *.cpp)OBJS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE))) #target you can change test to what you want #目標文件名,輸入任意你想要的執行文件名TARGET := http_client#compile and lib parameter #編譯參數CC := g++LIBS := LDFLAGS := DEFINES :=INCLUDE := CFLAGS := -g -Wall -O2 $(DEFINES) $(INCLUDE)
CXXFLAGS:= $(CFLAGS) #i think you should do anything here#下面的基本上不需要做任何改動了.PHONY : everything objs clean veryclean rebuild everything : $(TARGET)all : $(TARGET)objs : $(OBJS) rebuild: veryclean everything clean : rm -fr *.so rm -fr *.o veryclean : clean rm -fr $(TARGET)$(TARGET) : $(OBJS) $(CC) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -