51 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Makefile
		
	
	
		
		
			
		
	
	
			51 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Makefile
		
	
	
| 
								 | 
							
								######################################
							 | 
						|||
| 
								 | 
							
								#
							 | 
						|||
| 
								 | 
							
								######################################
							 | 
						|||
| 
								 | 
							
								#source file
							 | 
						|||
| 
								 | 
							
								#Դ<>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.c<><63>.cpp<70>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>궨<EFBFBD><EAB6A8>Ϊͬ<CEAA><CDAC>.o<>ļ<EFBFBD>
							 | 
						|||
| 
								 | 
							
								SOURCE  := $(wildcard *.c) $(wildcard *.cpp)
							 | 
						|||
| 
								 | 
							
								OBJS    := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								#target you can change test to what you want
							 | 
						|||
| 
								 | 
							
								#Ŀ<><C4BF><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>ִ<EFBFBD><D6B4><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
							 | 
						|||
| 
								 | 
							
								TARGET  := commonAction
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								#compile and lib parameter
							 | 
						|||
| 
								 | 
							
								#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
							 | 
						|||
| 
								 | 
							
								CC      := g++
							 | 
						|||
| 
								 | 
							
								CXX     := g++
							 | 
						|||
| 
								 | 
							
								LIBS    := -L/usr/local/lib -lhv -lsqlite3 -lpthread -ldl -static -lcgicc
							 | 
						|||
| 
								 | 
							
								LDFLAGS :=
							 | 
						|||
| 
								 | 
							
								DEFINES :=
							 | 
						|||
| 
								 | 
							
								INCLUDE := -I. -I/usr/local/include
							 | 
						|||
| 
								 | 
							
								CFLAGS  := -g -Wall -O3 $(DEFINES) $(INCLUDE) -std=c++11
							 | 
						|||
| 
								 | 
							
								CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								#i think you should do anything here
							 | 
						|||
| 
								 | 
							
								#<23><><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>κθĶ<CEB8><C4B6><EFBFBD>
							 | 
						|||
| 
								 | 
							
								.PHONY : everything objs clean veryclean rebuild
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								everything : $(TARGET) 
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								all : $(TARGET)
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								objs : $(OBJS)
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								rebuild: veryclean everything
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								clean :
							 | 
						|||
| 
								 | 
							
									rm -fr *.so *.a
							 | 
						|||
| 
								 | 
							
									rm -fr *.o
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								veryclean : clean
							 | 
						|||
| 
								 | 
							
									rm -fr $(TARGET)
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								$(TARGET) : $(OBJS)
							 | 
						|||
| 
								 | 
							
									$(CC) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
							 |