File tree 1 file changed +49
-0
lines changed
1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Makefile for CCN sims projects
2
+
3
+ # important: update these for each app
4
+ ASSETS =
5
+
6
+ # default package install
7
+ PKGDIR =$(HOME ) /ccnsimpkg
8
+
9
+ # app is assumed to be the same as the directory name
10
+ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST ) ) )
11
+ current_dir := $(notdir $(patsubst % /,% ,$(dir $(mkfile_path ) ) ) )
12
+ penultimateword =$(wordlist $(words $1 ) ,$(words $1 ) , x $1)
13
+
14
+ APP =$(current_dir )
15
+ CHAP =$(call penultimateword, $(subst /, ,$(dir $(mkfile_path ) ) ) )
16
+ PLATFORM =$@
17
+ DEST =$(PKGDIR ) /$(PLATFORM ) /$(CHAP )
18
+
19
+ # all std go defs
20
+ GOCMD =go
21
+ GOBUILD =$(GOCMD ) build
22
+ GOCLEAN =$(GOCMD ) clean
23
+ GOTEST =$(GOCMD ) test
24
+ GOGET =$(GOCMD ) get
25
+
26
+ all : build
27
+
28
+ build :
29
+ $(GOBUILD ) -v
30
+ dbg-build :
31
+ $(GOBUILD ) -v -gcflags=all=" -N -l" -tags debug
32
+ test :
33
+ $(GOTEST ) -v ./...
34
+ clean :
35
+ $(GOCLEAN )
36
+
37
+ # must do: go get github.com/shuLhan/go-bindata -- go install in cmd/go-bindata
38
+ bindata :
39
+ go-bindata $(ASSETS )
40
+ mac : build
41
+ - mkdir -p $(DEST )
42
+ - /bin/cp $(APP ) $(DEST )
43
+ linux : build
44
+ - mkdir -p $(DEST )
45
+ - /bin/cp $(APP ) $(DEST )
46
+ windows : build
47
+ - mkdir -p $(DEST )
48
+ - /bin/cp $(APP ) $(DEST )
49
+
You can’t perform that action at this time.
0 commit comments