CC=gcc STRIP=strip BIN=build SRC=src PREFIX=/usr CFLAGS=-Wall default: all all: clean build build: smol smol-pthreads smol-http smol-http-pthreads ws smol: $(CC) -o $(BIN)/smol $(SRC)/smol.c -lcrypto -lssl $(CFLAGS) smol-pthreads: $(CC) -o $(BIN)/smol-pthreads $(SRC)/smol-pthreads.c -lcrypto -lssl $(CFLAGS) smol-http: $(CC) -o $(BIN)/smol-http $(SRC)/smol-http.c $(CFLAGS) smol-http-pthreads: $(CC) -o $(BIN)/smol-http-pthreads $(SRC)/smol-http-pthreads.c $(CFLAGS) ws: $(CC) -o $(BIN)/ws $(SRC)/ws.c $(CFLAGS) -lcrypto -lssl clean: if [ -d $(BIN) ]; then rm -rv $(BIN);mkdir -pv $(BIN);else mkdir -pv $(BIN);fi install: cp -v $(BIN)/* $(PREFIX)/bin/ $(STRIP) $(PREFIX)/bin/smol $(STRIP) $(PREFIX)/bin/smol-pthreads $(STRIP) $(PREFIX)/bin/smol-http $(STRIP) $(PREFIX)/bin/smol-http-pthreads $(STRIP) $(PREFIX)/bin/ws uninstall: remove remove: if [ -f $(PREFIX)/bin/smol ];then rm -v $(PREFIX)/bin/smol;fi if [ -f $(PREFIX)/bin/smol-pthreads ];then rm -v $(PREFIX)/bin/smol-pthreads;fi if [ -f $(PREFIX)/bin/smol-http ];then rm -v $(PREFIX)/bin/smol-http;fi if [ -f $(PREFIX)/bin/smol-http-pthreads ];then rm -v $(PREFIX)/bin/smol-http-pthreads;fi if [ -f $(PREFIX)/bin/ws ];then rm -v $(PREFIX)/bin/ws;fi