.POSIX: CC=cc CFLAGS=-Wall -Wextra -Wno-unused-parameter E_CGLAGS=$$(pkg-config --cflags gtk+-3.0 jansson libcurl) \ -Ilibgs/src $(CFLAGS) LDFLAGS= E_LDFLAGS=$$(pkg-config --libs gtk+-3.0 jansson libcurl) \ -Llibgs -lgs $(LDFLAGS) DESTDIR= PREFIX=/usr/local BINDIR=$(PREFIX)/bin OBJECTS=src/main.o \ src/login_window.o \ src/main_window.o \ src/config.o \ src/log.o \ all: ap_client ap_client: $(OBJECTS) @echo $(CC) $(E_LDFLAGS) -o $@ $(OBJECTS) @$(CC) $(E_LDFLAGS) -o $@ $(OBJECTS) .c.o: @echo $(CC) $(E_CGLAGS) -c -o $@ $< @$(CC) $(E_CGLAGS) -c -o $@ $< install: ap_client mkdir -p $(DESTDIR)$(BINDIR) cp ap_client $(DESTDIR)$(BINDIR)/ap_client chmod 0775 $(DESTDIR)$(BINDIR)/ap_client clean: rm -f ap_client rm -rf src/*.o uninstall: rm -f $(DESTDIR)$(BINDIR)/ap_client src/config.o: src/config.c src/config.h src/log.h src/log.o: src/log.c src/log.h src/login_window.o: src/login_window.c src/main_window.h src/log.h src/main.o: src/main.c src/config.h src/main_window.h src/config.o: src/config.c src/config.h src/log.h src/log.o: src/log.c src/log.h src/login_window.o: src/login_window.c src/main_window.h src/log.h src/main.o: src/main.c src/config.h src/main_window.h src/config.o: src/config.c src/config.h src/log.h src/log.o: src/log.c src/log.h src/login_window.o: src/login_window.c src/main_window.h src/log.h src/main.o: src/main.c src/config.h src/main_window.h src/main_window.o: src/main_window.c src/log.h src/config.h \ src/login_window.h