First commit, configured makefile
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# Object file
|
||||
*.out
|
||||
|
||||
|
51
Makefile
Normal file
51
Makefile
Normal file
@@ -0,0 +1,51 @@
|
||||
# GNU/Linux specific Make directives.
|
||||
|
||||
# Declare tools.
|
||||
SHELL = /bin/sh
|
||||
CC = clang++
|
||||
LD = clang++
|
||||
ECHO = @echo
|
||||
|
||||
CFLAGS = -std=c++17 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter
|
||||
LDFLAGS = -lncurses
|
||||
|
||||
EXECUTABLE = Sparks
|
||||
|
||||
SOURCES = main.cpp functions.cpp
|
||||
OBJECTS = $(SOURCES:.cpp=.out)
|
||||
CLEANFILES = *.out
|
||||
|
||||
|
||||
|
||||
# To get a fully verbose make output do declare 'AT' at the command line like so: 'make AT='.
|
||||
# By default AT is undefined and thus assigned the string '@' which suppresses output from commands.
|
||||
AT ?= @
|
||||
|
||||
# Colors and efects
|
||||
#######################################
|
||||
NORMAL = \033[m
|
||||
|
||||
FG_DKGREEN = \033[32;7m
|
||||
FG_REDFULL = \033[31;7m
|
||||
FG_YELLOW = \033[33;7m
|
||||
FG_BLUE = \033[34;7m
|
||||
##########################################
|
||||
|
||||
.SUFFIXES: .cpp .out
|
||||
.PHONY: clean
|
||||
|
||||
# Compile
|
||||
all: $(EXECUTABLE)
|
||||
|
||||
.cpp.out:
|
||||
$(ECHO) "[$(FG_BLUE)COMPILING$(NORMAL)] $@"
|
||||
$(AT) $(CC) $(CFLAGS) -o $*.out -c $<
|
||||
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(ECHO) "[$(FG_YELLOW)LINKING$(NORMAL)] $(EXECUTABLE)"
|
||||
$(AT) $(LD) $(LDFLAGS) $(OBJECTS) -o $(EXECUTABLE)
|
||||
$(ECHO) "[$(FG_DKGREEN)SUCCESS$(NORMAL)] Run ./$(EXECUTABLE) to start your application, Enjoy :)"
|
||||
|
||||
clean:
|
||||
$(ECHO) "[$(FG_REDFULL)CLEANED$(NORMAL)] $(CLEANFILES)"
|
||||
$(AT) rm -rf $(CLEANFILES)
|
0
functions.cpp
Normal file
0
functions.cpp
Normal file
10
include/main.h
Normal file
10
include/main.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef __CHCOUNT_H__
|
||||
#define __CHCOUNT_H__
|
||||
|
||||
#include <iostream>
|
||||
#include <ncurses.h>
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user