import: makefile for the overlay helper, now officially renamed "oh"
This commit is contained in:
parent
5296a2e9d6
commit
b9d6fb26fd
1 changed files with 49 additions and 0 deletions
49
bin/overlayhelper/Makefile
Normal file
49
bin/overlayhelper/Makefile
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
#
|
||||||
|
# overlayhelper/Makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Make and Build Variables
|
||||||
|
|
||||||
|
VPATH = source:obj
|
||||||
|
SOURCEFILES = $(wildcard source/*.cpp)
|
||||||
|
OBJFILES = $(patsubst source/%.cpp,obj/%.o,$(SOURCEFILES))
|
||||||
|
CC = clang++
|
||||||
|
INCCMD = -Isource
|
||||||
|
# List of directories to create
|
||||||
|
DIRS=obj
|
||||||
|
|
||||||
|
CFLAGS = -std=c++17 -Os -Wall -Werror
|
||||||
|
#CFLAGS = -Os -Wall -Werror -S
|
||||||
|
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo
|
||||||
|
@echo overlayhelper Makefile
|
||||||
|
@echo -------------------------------------------------
|
||||||
|
@echo build commands:
|
||||||
|
@echo make install - Compile / Install
|
||||||
|
@echo make clean - Clean intermediate/target files
|
||||||
|
@echo -------------------------------------------------
|
||||||
|
@echo
|
||||||
|
|
||||||
|
overlayhelper: $(OBJFILES)
|
||||||
|
|
||||||
|
install: overlayhelper
|
||||||
|
$(CC) -o ../oh $(OBJFILES)
|
||||||
|
# $(CC) -o ../overlayhelper $(OBJFILES) -Wl,-Map,overlayhelper.map
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Remove overlayhelper
|
||||||
|
$(shell if exist overlayhelper echo Y | rm overlayhelper)
|
||||||
|
@echo Remove Intermediate Files
|
||||||
|
@rm obj\*
|
||||||
|
|
||||||
|
|
||||||
|
# Goofy Object File Rule
|
||||||
|
obj/%.o : source/%.cpp
|
||||||
|
@echo Compiling $(<F)
|
||||||
|
$(CC) $(CFLAGS) $(INCCMD) -c $< -o obj/$*.o
|
||||||
|
|
||||||
|
|
||||||
|
# Create all the directories
|
||||||
|
$(shell if not exist $(DIRS) mkdir $(DIRS))
|
Loading…
Add table
Reference in a new issue