-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 746 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 746 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
30
31
32
33
34
35
36
37
38
ifndef ORBISDEV
$(error ORBISDEV, is not set)
endif
# project name (generate executable with this name)
TARGET = gp4gen
CC = gcc
LINKER = $(CXX)
# change these to proper directories where each file should be
SRCDIR = src
SOURCES := $(wildcard $(SRCDIR)/*.c)
INCLUDES := $(wildcard $(SRCDIR)/*.h)
OBJECTS := $(SOURCES:$(SRCDIR)/%.c=$(SRCDIR)/%.o)
rm = rm -f
$(TARGET): $(OBJECTS)
@$(LINKER) $(OBJECTS) $(LFLAGS) -o $@
@echo "Linking complete!"
$(OBJECTS): $(SRCDIR)/%.o : $(SRCDIR)/%.c
@$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully!"
all: $(TARGET)
.PHONY: clean
clean:
@$(rm) $(OBJECTS) $(TARGET)
@echo "Cleanup complete!"
install:
@cp $(TARGET) $(ORBISDEV)/bin
@echo "$(TARGET) Installed!"