-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 804 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 -std=c99
OPT=-O0 -g
# Notice that -fno-omit-frame-pointer is needed so that when compiler optimization
# is on, %rbp will be used and so it is possible to calculate stack frame size.
GCC_OPT=-fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fpermissive -Wpointer-arith
#GCC_OPT=-fno-omit-frame-pointer
CFLAGS=$(GCC_OPT) $(OPT) -Wall -Wextra
OCR_FLAGS=-L${OCR_INSTALL}/lib -I${OCR_INSTALL}/include
OCR_LDFLAGS=-locr -lpthread -lrt
SRC=test.c test_ocr.c test_guid_labeling.c test_spmd_ocr.c test_send_ocr.c
ASM=$(SRC:.c=.s)
TARGET=$(SRC:.c=)
all: $(TARGET)
%.s: %.c
$(CC) -S $(OCR_FLAGS) $(OCR_LDFLAGS) $(CFLAGS) $<
%: %.c
$(CC) $(CFLAGS) $(OCR_FLAGS) $(OCR_LDFLAGS) $< -o $@
%_asm: %.s
$(CC) $(CFLAGS) $(OCR_FLAGS) $(OCR_LDFLAGS) $< -o $@
clean:
rm -f *.o *.s $(TARGET) *_asm