Skip to content
Snippets Groups Projects
Commit eda26fb6 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

change makefile to track all .c files in src and src/* directories

also move a comment in deploy.sh to make it more logical
parent 5e8bac28
No related branches found
No related tags found
No related merge requests found
......@@ -9,24 +9,30 @@ SRCDIR = src
OBJDIR = obj
BINDIR = bin
DEPS=$(wildcard $(SRCDIR)/*/*.c) $(wildcard $(SRCDIR)/*.c)
SOURCES := $(SRCDIR)/$(TARGET).c
INCLUDES := $(wildcard $(SRCDIR)/*.h)
OBJECTS := $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o)
$(BINDIR)/$(TARGET): $(BINDIR)
$(BINDIR):
mkdir -p $(BINDIR)
$(BINDIR)/$(TARGET): $(OBJECTS)
@$(LINKER) $(OBJECTS) $(LFLAGS) -o $@
@echo "Linking complete."
$(OBJECTS): | $(OBJDIR)
$(OBJDIR):
## Compile an object for a c file in SRCDIR
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS)
mkdir -p $(OBJDIR)
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.c
@$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully."
cryptops-api:
echo "test"
echo $(DEPS)
.PHONY: clean
clean:
@rm -f $(OBJECTS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment