-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (30 loc) · 883 Bytes
/
Makefile
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
#Makefile for norbeshell, if you want to change the project name without
PROJ_NAME=norbeshell
INSTALL_TO=/bin
#################################################################################
#Stuff like compiler to be used, normally bigger, but this is a small breadshell
CC=g++
RM=rm -f
CP=cp
#################################################################################
# Source
USER_SRCS = $(wildcard src/*.cpp)
# Objects
USER_OBJECTS = $(USER_SRCS:.cpp=.o)
CFLAGS=-c -Wall
$(PROJ_NAME).release.exe: $(USER_OBJECTS)
$(CC) $(USER_OBJECTS) -o $@
#rule for cpp
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
@echo $@
.PHONY: install uninstall clean
all: $(PROJ_NAME).release.exe
clean:
$(RM) src/*.o
$(RM) $(PROJ_NAME).release.exe
install: | clean all
$(CP) $(PROJ_NAME).release.exe $(INSTALL_TO)/$(PROJ_NAME)
uninstall:
$(RM) $(INSTALL_TO)/$(PROJ_NAME)