some fixes; added chkweather

This commit is contained in:
2026-05-13 13:41:36 +03:00
parent 9e05bdd807
commit a31d809c2e
5 changed files with 61 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ CC = gcc
CFLAGS = -Wall -Wextra -fPIC -DEBUG
LDFLAGS = -lrt -pthread -lusefull_macros
all: weather_daemon libweather.so weather_clt_example
all: weather_daemon libweather.so weather_clt_example chkweather
weather_daemon: weather_daemon.o
$(CC) -o $@ $^ $(LDFLAGS)
@@ -10,6 +10,9 @@ weather_daemon: weather_daemon.o
weather_clt_example: weather_clt_example.o
$(CC) -o $@ $^ $(LDFLAGS) -l weather -L.
chkweather: chkweather.o
$(CC) -o $@ $^ $(LDFLAGS) -l weather -L.
weather_daemon.o: weather_daemon.c weather_data.h
$(CC) $(CFLAGS) -c $<
@@ -25,9 +28,12 @@ weather_client.o: weather_client.c weather_data.h
weather_clt_example.o: weather_clt_example.c libweather.so
$(CC) $(CFLAGS) -c $<
chkweather.o: chkweather.c libweather.so
$(CC) $(CFLAGS) -c $<
clean:
rm -f *.o weather_daemon libweather.so libweather.a weather_clt_example
install:
cp libweather.so /usr/local/lib/
cp weather_data.h /usr/local/include/
cp weather_data.h /usr/local/include/