Commit 1289b065 by Chloe Dequeker

Better Makefile and adding global test file

parent 8dc9345c
No preview for this file type
CC=gcc CC=gcc
CFLAGS=-c -Wall -g -O3 CFLAGS=-c -Wall -g -O3
LDFLAGS=-lm -pthread LDFLAGS=-lm
SOURCES=INTBuilder.c rotation.c allocate.c param.c
SRC_DIR=src SRC_DIR=src
SOURCES=$(shell find $(SRC_DIR) -name '*.c')
OBJECTS=$(SOURCES:.c=.o) OBJECTS=$(SOURCES:.c=.o)
BINARY=INTBuilder BINARY=INTBuilder
all: $(BINARY) all: $(BINARY)
$(BINARY): $(SRC_DIR)/$(OBJECTS) $(BINARY): $(OBJECTS)
cd $(SRC_DIR) && $(CC) $(OBJECTS) -o ../$@ $(LDFLAGS) $(CC) $^ -o $@ $(LDFLAGS)
%.o: $(SRC_DIR)/%.c %.o: %.c
$(CC) $(CFLAGS) $< -o $(SRC_DIR)/$@ $(CC) $(CFLAGS) $< -o $@
clean : clean :
rm -f $(SRC_DIR)/*.o 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