Newer
Older
DeltaGo_gcc / Makefile
@Motoki Motoki 9 days ago 864 bytes preprocess
SHELL	= /bin/sh
# To enable SSE, erase '#' below
CC     = gcc #-DUSE_SSE 

#---optimize---
# To disable the optimizing of gcc, comment out below line by '#'.
CFLAGS += -O3

# To enable SSE, erase '#' below
LDFLAGS = -lm #-mavx
DEFS	= 

CSRCS	= main.c init.c util.c move.c bit_util.c get_feature.c cnn_calc.c 
# ===========================================================================

OBJS	= $(CSRCS:.c=.o)
TARGET  = deltaGo

.PHONY: clean
.SUFFIXES: .c .o

$(TARGET): $(OBJS)
	$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)

.c.o:
	$(CC) -c $(CFLAGS) $(DEFS) $(INCDIR) -o $@ $< $(LDFLAGS)

# プリプロセスのみ実行して .i ファイルを出力
pre:
	@for f in $(CSRCS); do \
		base=$$(basename $$f .c); \
		$(CC) -E $(CFLAGS) $(DEFS) $(INCDIR) $$f -o $$base.i; \
		echo "Preprocessed $$f -> $$base.i"; \
	done

clean:
	$(RM) $(OBJS) $(TARGET) core *.o *~ *.i