Commit 1289b065 by Chloe Dequeker

Better Makefile and adding global test file

parent 8dc9345c
No preview for this file type
CC=gcc
CFLAGS=-c -Wall -g -O3
LDFLAGS=-lm -pthread
SOURCES=INTBuilder.c rotation.c allocate.c param.c
LDFLAGS=-lm
SRC_DIR=src
SOURCES=$(shell find $(SRC_DIR) -name '*.c')
OBJECTS=$(SOURCES:.c=.o)
BINARY=INTBuilder
all: $(BINARY)
$(BINARY): $(SRC_DIR)/$(OBJECTS)
cd $(SRC_DIR) && $(CC) $(OBJECTS) -o ../$@ $(LDFLAGS)
$(BINARY): $(OBJECTS)
$(CC) $^ -o $@ $(LDFLAGS)
%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) $< -o $(SRC_DIR)/$@
%.o: %.c
$(CC) $(CFLAGS) $< -o $@
clean :
rm -f $(SRC_DIR)/*.o
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment