Skip to content

Commit aacfa8e

Browse files
committed
balls working now that compiles with g++ instead of cc...
1 parent eda25ee commit aacfa8e

6 files changed

Lines changed: 114 additions & 126 deletions

File tree

‎gsl/makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ clean:
4545
install-deps-ubuntu:
4646
sudo apt-get install -y libgsl0-dev gsl-doc-info
4747
#if you will use plplot:
48-
sudo aptitude install -y libplplot-dev plplot11-driver-xwin
48+
sudo apt-get install -y libplplot-dev plplot11-driver-xwin

‎opengl/bouncing_balls/makefile‎

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
CC := cc
2-
LIBS := -lGL -lGLU -lglut -lm
3-
#compile command
1+
CC := g++
2+
LIBS := -lm -lGL -lGLU -lglut
43

5-
IN_EXT=.cpp
6-
#extension of input files
4+
IN_EXT := .cpp
5+
IN_DIR := ./
6+
OUT_DIR := _out/
7+
OUT_EXT :=
78

8-
IN_DIR=./
9-
#directory from which input files come. slash termianted.
9+
INS := $(wildcard $(IN_DIR)*$(IN_EXT))
10+
INS_NODIR := $(notdir $(INS))
11+
OUTS_NODIR := $(patsubst %$(IN_EXT),%$(OUT_EXT),$(INS_NODIR))
12+
OUTS := $(addprefix $(OUT_DIR),$(OUTS_NODIR))
1013

11-
OUT_DIR=_out/
12-
#dir where output files such as .pdf will be put. slash terminated.
13-
14-
OUT_EXT=
15-
#extension of output
16-
17-
INS=$(wildcard $(IN_DIR)*$(IN_EXT))
18-
INS_NODIR=$(notdir $(INS))
19-
OUTS_NODIR=$(patsubst %$(IN_EXT),%$(OUT_EXT),$(INS_NODIR))
20-
OUTS=$(addprefix $(OUT_DIR),$(OUTS_NODIR))
14+
#RUN := one_ball
15+
RUN := multi_ball
2116

2217
.PHONY: all mkdir clean
2318

@@ -26,8 +21,11 @@ all: mkdir $(OUTS)
2621
$(OUT_DIR)%$(OUT_EXT): $(IN_DIR)%$(IN_EXT)
2722
$(CC) -o "$@" "$<" $(LIBS)
2823

24+
clean:
25+
rm -rf $(OUT_DIR) $(AUX_DIR)
26+
2927
mkdir:
3028
mkdir -p "$(OUT_DIR)"
3129

32-
clean:
33-
rm -rf $(OUT_DIR) $(AUX_DIR)
30+
run: all
31+
cd $(OUT_DIR) && ./$(RUN)$(OUT_EXT)

0 commit comments

Comments
 (0)