mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
29 lines
681 B
Makefile
29 lines
681 B
Makefile
CC=gcc
|
|
COMMON=-Wall `pkg-config --cflags opencv`
|
|
UNAME = $(shell uname)
|
|
ifeq ($(UNAME), Darwin)
|
|
COMMON += -isystem /usr/local/Cellar/opencv/2.4.6.1/include/opencv -isystem /usr/local/Cellar/opencv/2.4.6.1/include
|
|
else
|
|
COMMON += -march=native
|
|
endif
|
|
CFLAGS= $(COMMON) -O3 -ffast-math -flto
|
|
#CFLAGS= $(COMMON) -O0 -g
|
|
LDFLAGS=`pkg-config --libs opencv` -lm
|
|
VPATH=./src/
|
|
|
|
OBJ=network.o image.o tests.o convolutional_layer.o connected_layer.o maxpool_layer.o activations.o list.o option_list.o parser.o utils.o data.o matrix.o softmax_layer.o
|
|
|
|
all: cnn
|
|
|
|
cnn: $(OBJ)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -rf $(OBJ) cnn
|
|
|