Initial Commit
This commit is contained in:
24
riceapp/build/Makefile
Normal file
24
riceapp/build/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
CC = gcc
|
||||
CFLAGS = -I../include -Wall -O2
|
||||
LDFLAGS = -lm
|
||||
SRCDIR = ../src
|
||||
OBJDIR = ../obj
|
||||
BUILDDIR = ../build
|
||||
TARGET = cube_app
|
||||
|
||||
SOURCES = $(wildcard $(SRCDIR)/*.c)
|
||||
OBJECTS = $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) $(OBJECTS) $(LDFLAGS) -o $(BUILDDIR)/$(TARGET)
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJDIR)/*.o $(BUILDDIR)/$(TARGET)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
BIN
riceapp/build/cube_app
Executable file
BIN
riceapp/build/cube_app
Executable file
Binary file not shown.
Reference in New Issue
Block a user