-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 715 Bytes
/
Makefile
File metadata and controls
35 lines (25 loc) · 715 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
32
#CC=arm-linux-gnueabihf-gcc-4.4
CC=gcc
MYSHAREDLIB=./
BIN=./
MYLIB=-llogging
COMPILESTATUS=real
logbin: liblogging.so
ifeq ($(COMPILESTATUS),testing)
@echo "compiling this module for testing"
$(CC) -Wall -DTESTING main.c -o $(BIN)/logbin -lz -lcrypt -lm -L$(MYSHAREDLIB) $(MYLIB)
else
$(CC) -Wall main.c -o $(BIN)/logbin -lz -lcrypt -lm -L$(MYSHAREDLIB) $(MYLIB)
endif
liblogging.so: logging.o
$(CC) -Wall -shared -o $(MYSHAREDLIB)/liblogging.so logging.o
logging.o:
ifeq ($(COMPILESTATUS),testing)
@echo "compiling this module for testing"
$(CC) -Wall -DTESTING -c -fpic logging.c
else
$(CC) -Wall -c -fpic logging.c
endif
install:
mv $(MYSHAREDLIB)/liblogging.so /usr/local/lib/
ldconfig