45 lines
773 B
Makefile
45 lines
773 B
Makefile
CC = gcc
|
|
CFLAGS = -O2 -s -D_GNU_SOURCE
|
|
LDLIBS = -lcyassl -lm
|
|
PREFIX =
|
|
BINDIR = $(PREFIX)/usr/bin
|
|
|
|
ifeq ($(CROSS_BUILD), 1)
|
|
DEFS:=-DCROSS_BUILD
|
|
else
|
|
DEFS:=
|
|
endif
|
|
|
|
all: webget webpost
|
|
@echo "All done!"
|
|
|
|
webget: webget.o libweb.o
|
|
$(CC) $(CFLAGS) $(LDLIBS) webget.o libweb.o -o webget
|
|
|
|
webpost: webpost.o libweb.o
|
|
$(CC) $(CFLAGS) $(LDLIBS) webpost.o libweb.o -o webpost
|
|
|
|
webget.o: webget.c
|
|
$(CC) $(CFLAGS) $(DEFS) -c webget.c
|
|
|
|
webpost.o: webpost.c
|
|
$(CC) $(CFLAGS) $(DEFS) -c webpost.c
|
|
|
|
libweb.o: libweb.c
|
|
$(CC) $(CFLAGS) $(DEFS) -c libweb.c
|
|
|
|
install:
|
|
mkdir -p $(BINDIR)
|
|
cp webget $(BINDIR)
|
|
cp webpost $(BINDIR)
|
|
@echo "All done!"
|
|
|
|
uninstall:
|
|
@rm -f $(BINDIR)/webget
|
|
@rm -f $(BINDIR)/webpost
|
|
@echo "All done!"
|
|
|
|
clean:
|
|
rm -f webget webpost *.o
|
|
@echo "All done!"
|