-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (25 loc) · 842 Bytes
/
Makefile
File metadata and controls
31 lines (25 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TARGET=gprs
OBJ=lnklst.o serial.o telLibrary.o uni.o utils.o sms_menu.o green_ctrl.o
CFLAG=-Wall -O2
GCC=arm-linux-gcc
OFFSET=\x1b[41G
COLOR=\x1b[1;34m
RESET=\x1b[0m
CLEAR=\x1b[H\x1b[J
$(TARGET): main.c $(OBJ)
@echo -n "Generating $@..."
@if $(GCC) $(CFLAG) -o $@ $^ -lpthread; then echo -e "$(OFFSET)$(COLOR)[ OK ]$(RESET)"; fi
%.o: %.c
@echo -n "Compiling $<..."
@if $(GCC) $(CFLAG) -c -o $@ $<; then echo -e "$(OFFSET)$(COLOR)[ OK ]$(RESET)"; else exit 1; fi
%.o: %.c %.h
@echo -n "Compiling $<..."
@if $(GCC) $(CFLAG) -c -o $@ $<; then echo -e "$(OFFSET)$(COLOR)[ OK ]$(RESET)"; else exit 1; fi
clean:
@echo -n "Cleanning up..."
@rm -rf *.o *.bak *~ $(TARGET)
@echo -e "$(OFFSET)$(COLOR)[ OK ]$(RESET)"
clear:
@echo -ne "$(CLEAR)Cleanning up..."
@rm -rf *.o *.bak *~ $(TARGET)
@echo -e "$(OFFSET)$(COLOR)[ OK ]$(RESET)"