forked from scanoss/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (23 loc) · 917 Bytes
/
Makefile
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
CC = gcc
CFLAGS = -O -lz -Wall -g -Iinc -Iexternal/inc
OBJ= bin/main.o bin/blacklist.o bin/blacklist_ext.o bin/snippets.o bin/scan.o bin/psi.o bin/keywords.o bin/match.o bin/report.o bin/spdx.o bin/cyclonedx.o bin/copyright.o bin/vulnerability.o bin/quality.o bin/license.o bin/dependency.o bin/file.o bin/parse.o bin/query.o bin/debug.o bin/help.o bin/winnowing.o bin/crc32c.o bin/util.o bin/limits.o bin/json.o bin/rank.o bin/mz.o bin/attributions.o bin/cryptography.o
bin/%.o: src/%.c
@echo Building deps
$(CC) $(CFLAGS) -c -o $@ $<
bin/%.o: external/src/%.c
@echo Building external deps
$(CC) $(CFLAGS) -c -o $@ $<
scanoss: $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ -lldb -lm -lpthread -lcrypto
@echo Scanoss built
clean:
@echo Cleaning...
@rm -f bin/*.o
@rm -f scanoss *.o
distclean: clean
install:
@cp libldb.so /usr/lib
@cp scanoss /usr/bin
uninstall:
@rm libldb.so /usr/lib
@rm scanoss /usr/bin