-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
48 lines (37 loc) · 1.16 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Reflector: A simple struct reflection framework for C++17.
# @file Makefile for compiling, installing and automatically testing.
# @author Rodrigo Siqueira <rodriados@gmail.com>
# @copyright 2024-present Rodrigo Siqueira
export
NAME = reflector
INCDIR = src
SRCDIR = src
EXPDIR = examples
TSTDIR = test
DSTDIR ?= dist
OBJDIR ?= obj
BINDIR ?= bin
CXX ?= g++
STDCPP ?= c++17
# The operational system check. At least for now, we assume that we are always running
# on a Linux machine. Therefore, a disclaimer must be shown if this is not true.
SYSTEMOS := $(shell uname)
SYSTEMOS := $(patsubst MINGW%,Windows,$(SYSTEMOS))
SYSTEMOS := $(patsubst MSYS%,Msys,$(SYSTEMOS))
SYSTEMOS := $(patsubst CYGWIN%,Msys,$(SYSTEMOS))
ifneq ($(SYSTEMOS), Linux)
$(info Warning: This makefile assumes OS to be Linux.)
endif
all: distribute
prepare-distribute:
@mkdir -p $(DSTDIR)
distribute: prepare-distribute
@$(MAKE) --no-print-directory -f makethird distribute
clean-distribute:
@rm -rf $(DSTDIR)
@$(MAKE) --no-print-directory -f makethird clean
clean: clean-distribute
@rm -rf $(OBJDIR)
@rm -rf $(BINDIR)
.PHONY: all clean
.PHONY: prepare-distribute distribute clean-distribute