diff --git a/logcat/Makefile b/logcat/Makefile index 19a47c5..ccdfd7e 100644 --- a/logcat/Makefile +++ b/logcat/Makefile @@ -7,15 +7,19 @@ OBJ = logcat.o CFLAGS = -Wall -Wextra -I $(LOGCAT_DIR)/include -DHAVE_IOCTL LDFLAGS = -L$(STAGING_DIR)/usr/lib -llog TARGET=logcat +TEST := logcat_test # rules -all: $(TARGET) +all: $(TARGET) $(TEST) $(TARGET): $(OBJ) + $(CXX) $(LDFLAGS) $^ -o $@ + +$(TEST): logcat_test.c $(CC) $(LDFLAGS) $^ -o $@ %.o: %.cpp - $(CC) -c $(CFLAGS) $^ -o $@ + $(CXX) -c $(CFLAGS) $^ -o $@ .PHONY: clean diff --git a/logcat/logcat_test.c b/logcat/logcat_test.c new file mode 100644 index 0000000..b48bcdb --- /dev/null +++ b/logcat/logcat_test.c @@ -0,0 +1,11 @@ +#include +#include +#include + +int main(int argc, char ** argv){ + while (1){ + sleep(1); + ALOGE("abert %s: test======>%d \n", __FUNCTION__, __LINE__); + } + return 0; +}