forked from CCSI-Toolset/FOQUS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (35 loc) · 833 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
32
33
34
35
36
37
38
39
40
41
42
43
# A simple makefile for creating the Simulation-Based Optimization
# distribution file
VERSION=$(shell git describe --tags --dirty)
PRODUCT=foqus
LICENSE=LICENSE.md
PACKAGE=CCSI_$(PRODUCT)_$(VERSION).zip
PAYLOAD = docs/*.pdf \
*.py \
examples \
foqus_lib \
test \
$(LICENSE)
# OS detection & changes
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
MD5BIN=md5sum
endif
ifeq ($(UNAME), Darwin)
MD5BIN=md5
endif
ifeq ($(UNAME), FreeBSD)
MD5BIN=md5
endif
.PHONY: all docs dmf clean
all: $(PACKAGE)
# Make zip file without extra file attributes (-X) so md5sum doesn't
# change if the payload hasn't
$(PACKAGE): $(PAYLOAD) docs
@zip -qXr $(PACKAGE) $(PAYLOAD)
@$(MD5BIN) $(PACKAGE)
docs:
@$(MAKE) -C manual
clean:
@$(MAKE) -C manual clean
@rm -rf $(PACKAGE) $(DOCDIR) *~