1 GET =
2 PREFIX_BIN =
3
4 CC = gcc
5 CXX = g++
6 INCLUDES =
7 LIBS = -lmxml
8 CFLAGS = -fno-inline -Wall -g -fPIC
9 LINKFLAGS =
10
11 TARGET= test
12
13 C_SOURCES = $(wildcard *.c)
14 C_OBJS = $(patsubst %.c, %.o, $(C_SOURCES))
15 CPP_SOURCES = $(wildcard *.cpp)
16 CPP_OBJS = $(patsubst %.cpp, %.o, $(CPP_SOURCES))
17
18 all: test.so
19
20 test.so: a.cpp b.cpp c.cpp d.cpp test.cpp
21 g++ -shared -fPIC $^ -o rlr.so $(LIBS)
22
23 clean:
24 rm -f $(CPP_OBJS) $(C_OBJS)
25 rm -f rlr.so
26
27 install: $(TARGET)
28 cp $(TARGET) $(PREFIX_BIN)
29
30 uninstall:
31 rm -f $(PREFIX)/$(PREFIX_BIN)
32
33 rebuild: clean compile
利用这个文件,进行简单的修改,就能满足简单的需求