move sources at src/, create make install

This commit is contained in:
oblique 2012-03-03 07:25:25 +02:00
parent ed764ef652
commit f378019409
11 changed files with 17 additions and 3 deletions

@ -1,5 +1,15 @@
PREFIX ?= /usr/local
CC = $(CROSS_COMPILE)gcc
OBJS = wificurse.o iw.o dev.o error.o console.o
OBJS = src/wificurse.o src/iw.o src/dev.o src/error.o src/console.o
.PHONY: clean all install
ifneq ($(DESTDIR),)
INSTALLDIR = $(subst //,/,$(DESTDIR)/$(PREFIX))
else
INSTALLDIR = $(PREFIX)
endif
all: wificurse
@ -9,5 +19,9 @@ wificurse: $(OBJS)
%.o: %.c %.h
$(CC) $(CFLAGS) -c -o $@ $<
install: all
@mkdir -p $(INSTALLDIR)/bin
cp wificurse $(INSTALLDIR)/bin/wificurse
clean:
@rm -f *~ *.o wificurse
@rm -f src/*~ src/\#*\# src/*.o *~ \#*\# wificurse

@ -130,7 +130,7 @@ void update_scr(struct ap_list *apl, struct dev *dev) {
ap = ap->next;
}
/* from cursor to end of display */
/* clear screen from cursor to end of display */
printf("\033[J");
fflush(stdout);
}