###################################### # # 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 # 源文件,自動(dòng)找所有 .c 和 .cpp 文件,并將目標(biāo)定義為同名 .o 文件 SOURCE OBJS #target you can change test to what you want # 目標(biāo)文件名,輸入任意你想要的執(zhí)行文件名 TARGET #compile and lib parameter # 編譯參數(shù) CC LIBS LDFLAGS:= DEFINES:= INCLUDE:= -I. CFLAGS CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H #i think you should do anything here # 下面的基本上不需要做任何改動(dòng)了 .PHONY : everything objs clean veryclean rebuild everything : $(TARGET) all : $(TARGET) objs : $(OBJS) rebuild: veryclean everything clean : veryclean : clean $(TARGET) : $(OBJS) |
###################################### # # Generic Static Library 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. # ###################################### #target you can change test to what you want # 共享庫文件名, lib*.a TARGET #compile and lib parameter # 編譯參數(shù) CC AR RANLIB LIBS LDFLAGS:= DEFINES:= INCLUDE:= -I. CFLAGS CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H #i think you should do anything here # 下面的基本上不需要做任何改動(dòng)了 #source file # 源文件,自動(dòng)找所有 .c 和 .cpp 文件,并將目標(biāo)定義為同名 .o 文件 SOURCE OBJS .PHONY : everything objs clean veryclean rebuild everything : $(TARGET) all : $(TARGET) objs : $(OBJS) rebuild: veryclean everything clean : veryclean : clean $(TARGET) : $(OBJS) |
###################################### # # Generic Share Library 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. # ###################################### #target you can change test to what you want # 共享庫文件名, lib*.so TARGET #compile and lib parameter # 編譯參數(shù) CC LIBS LDFLAGS:= DEFINES:= INCLUDE:= -I. CFLAGS CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H SHARE #i think you should do anything here # 下面的基本上不需要做任何改動(dòng)了 #source file # 源文件,自動(dòng)找所有 .c 和 .cpp 文件,并將目標(biāo)定義為同名 .o 文件 SOURCE OBJS .PHONY : everything objs clean veryclean rebuild everything : $(TARGET) all : $(TARGET) objs : $(OBJS) rebuild: veryclean everything clean : veryclean : clean $(TARGET) : $(OBJS) |