commit 1c4c155

shtrophic  ·  2025-01-24 20:00:16 +0000 UTC
parent 85be7f3
add tests subdirectory with makefile target
1 files changed,  +8, -2
+8, -2
 1@@ -8,11 +8,16 @@ snac: snac.o main.o sandbox.o data.o http.o httpd.o webfinger.o \
 2     activitypub.o html.o utils.o format.o upgrade.o mastoapi.o
 3 	$(CC) $(CFLAGS) -L$(PREFIX)/lib *.o -lcurl -lcrypto $(LDFLAGS) -pthread -o $@
 4 
 5+test: tests/smtp
 6+
 7+tests/smtp: tests/smtp.o
 8+	$(CC) $(CFLAGS) -L$(PREFIX)/lib $< -lcurl $(LDFLAGS) -o $@
 9+
10 .c.o:
11-	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(PREFIX)/include -c $<
12+	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(PREFIX)/include -c $< -o $@
13 
14 clean:
15-	rm -rf *.o *.core snac makefile.depend
16+	rm -rf *.o tests/*.o tests/smtp *.core snac makefile.depend
17 
18 dep:
19 	$(CC) -I$(PREFIX)/include -MM *.c > makefile.depend
20@@ -64,3 +69,4 @@ utils.o: utils.c xs.h xs_io.h xs_json.h xs_time.h xs_openssl.h \
21  xs_random.h xs_glob.h xs_curl.h xs_regex.h snac.h http_codes.h
22 webfinger.o: webfinger.c xs.h xs_json.h xs_curl.h xs_mime.h snac.h \
23  http_codes.h
24+tests/smtp.o: tests/smtp.c xs.h xs_curl.h