Exercise 3 for the course "Parallel and distributed systems" of THMMY in AUTH university.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
|
|
# ============================================
|
|
|
|
# COMMANDS
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
RM = rm -f
|
|
|
|
CFLAGS=-lm -O3 -Wall -I.
|
|
|
|
OBJ=serial.o serial_declarations.o
|
|
|
|
DEPS=serial_declarations.h
|
|
|
|
|
|
|
|
# ==========================================
|
|
|
|
# TARGETS
|
|
|
|
|
|
|
|
EXECUTABLES = serial mean-shift
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all: $(EXECUTABLES)
|
|
|
|
|
|
|
|
# ==========================================
|
|
|
|
# DEPENDENCIES (HEADERS)
|
|
|
|
|
|
|
|
%.o: %.c $(DEPS)
|
|
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
|
|
|
|
.PRECIOUS: $(EXECUTABLES) $(OBJ)
|
|
|
|
|
|
|
|
# ==========================================
|
|
|
|
# EXECUTABLE (MAIN)
|
|
|
|
|
|
|
|
$(EXECUTABLES): $(OBJ)
|
|
|
|
$(CC) -o $@ $^ $(CFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) *.o *~ $(EXECUTABLES)
|