-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (40 loc) · 1013 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
44
45
46
#!/bin/make
DIR = ./src/
PROGRAM = ./bin/testapp
MAIN = $(DIR)testapp.cpp
SRC = $(MAIN) $(wildcard $(DIR)*/*.cpp)
STATUS_FILE = $(DIR)dummy.h
CC = g++
CFLAGS = -Wall -std=c++11 -O3 -mtune=native -march=native
LDFLAGS =
OF_INCLUDE = $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
ifdef OF_ROOT
include $(OF_INCLUDE)
endif
# compile without visualization
.PHONY: c
c:
@if [ -e $(STATUS_FILE) ]; then rm $(STATUS_FILE); fi
@touch $(STATUS_FILE)
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $(PROGRAM)
@rm $(STATUS_FILE)
# compile with openFrameworks
.PHONY: of
of:
@if [ -e $(STATUS_FILE) ]; then rm $(STATUS_FILE); fi
@touch $(STATUS_FILE)
@echo \#define OF >> $(STATUS_FILE)
$(MAKE)
@rm $(STATUS_FILE)
# implement without visualization
.PHONY: crun
crun:
@$(PROGRAM) -p ${param}
# implement with openFrameworks
.PHONY: ofrun
ofrun:
@./bin/$(APPNAME).app/Contents/MacOS/$(APPNAME) ${file} -p ${param}
.PHONY: clean
clean:
rm -rf ./bin/$(APPNAME).app
rm -f $(PROGRAM)