forked from OpenJVS/OpenJVS-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (24 loc) · 752 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (24 loc) · 752 Bytes
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
SRCDIR := src
BUILDDIR := build
BINDIR := bin
TARGET := bin/openjvs
SRCEXT := c
SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
CFLAGS := -std=gnu99
DEFINES :=
LIB := -pthread
INC := -I include
$(TARGET): $(OBJECTS)
@echo " Linking:"
@echo " $(CC) $^ -o $(TARGET) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIB)
$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
@echo " Building:"
@mkdir -p $(BUILDDIR)
@mkdir -p $(BINDIR)
@echo " $(CC) $(CFLAGS) $(DEFINES) $(INC) -c -o $@ $<"; $(CC) $(CFLAGS) $(DEFINES) $(INC) -c -o $@ $<
clean:
@echo " Cleaning";
@echo " $(RM) -r $(BUILDDIR) $(TARGET) $(BINDIR)"; $(RM) -r $(BUILDDIR) $(TARGET) $(BINDIR)
.PHONY: clean