diff options
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/Makefile b/tests/Makefile index 5c602cb..00bfe3d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,18 +1,25 @@ -LDFLAGS = -L .. -LIBS = -lcgroup -lpthread +LDFLAGS = -L .. -L. +LIBS = -lcgroup -lpthread -ltest_functions INC = -I .. CXXFLAGS = -g -O2 -Wall -DDEBUG $(INC) CFLAGS = -g -O2 -Wall -DDEBUG -TARGET= libcgrouptest01 \ +TARGET= libtest_functions.a \ + libcgrouptest01 \ libcg_ba \ setuid \ pathtest all: $(TARGET) -libcgrouptest01: libcgrouptest01.c - $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS) +test_functions.o: test_functions.c + $(CXX) $(CXXFLAGS) -c $< + +libtest_functions.a: test_functions.o + $(AR) -cr $@ $^ + +libcgrouptest01: test_functions.o libcgrouptest01.c + $(CXX) $(CXXFLAGS) -o $@ libcgrouptest01.c $(LDFLAGS) $(LIBS) libcg_ba: libcg_ba.cpp $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS) @@ -24,4 +31,4 @@ pathtest: pathtest.c $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS) clean: - \rm -f $(TARGET) + \rm -f $(TARGET) test_functions.o |