Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·77 lines (58 loc) · 1.65 KB
/
Copy pathMakefile
File metadata and controls
executable file
·77 lines (58 loc) · 1.65 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
CC=g++
CCFLAGS=-Wall -O3 -s
VER=1.9.1
MESSAGE="SGAL Simple Genetic Algorithm Library 1.9.0"
PROGS=gal gal2 gal3 opt synth_optimizer oscillator_params rhythm_evolution
HEADERS=ACG.h RNG.h chrom.h pool.h operator.h engine.h eval.h pRandom.h ga.h
SOURCES=ACG.cc RNG.cc pool.cc operator.cc engine.cc pRandom.cc opt.cc gal.cc gal2.cc gal3.cc
OBJS=ACG.o RNG.o pool.o operator.o engine.o pRandom.o
LIBS=-lm
all: $(PROGS)
gal: $(OBJS) gal.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
gal2: $(OBJS) gal2.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
gal3: $(OBJS) gal3.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
opt: $(OBJS) opt.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
synth_optimizer: $(OBJS) synth_optimizer.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
oscillator_params: $(OBJS) oscillator_params.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
rhythm_evolution: $(OBJS) rhythm_evolution.o
$(CC) $(CCFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
$(HEADERS):
co $@
.cc.o:
$(CC) $(CCFLAGS) -c $<
depend dep: co
$(CC) -M *.cc > .depend
checkout co:
co $(HEADERS)
co $(SOURCES)
co copyright
editall:
co -l $(HEADERS) $(SOURCES) copyright Makefile
saveall:
ci -f$(VER) $(HEADERS) $(SOURCES) copyright Makefile
test:
echo $(REVISION)
clean:
rm -f $(PROGS) *.o
dist: clean co
mkdir ngal-$(VER)
cp Makefile ngal-$(VER)/
cp $(HEADERS) ngal-$(VER)/
cp $(SOURCES) ngal-$(VER)/
cp copyright ngal-$(VER)/
chmod 0755 ngal-$(VER)
chmod 0644 ngal-$(VER)/*
tar zcvf ngal-$(VER).tar.gz ngal-$(VER)
rm -rf ngal-$(VER)
# This dummy stuff makes sure dependencies are included
# To keep everything up to date.
dummy:
ifeq (.depend,$(wildcard .depend))
include .depend
endif