Skip to content

Commit

Permalink
Global make file
Browse files Browse the repository at this point in the history
  • Loading branch information
ujh committed Dec 27, 2023
1 parent 60d2a5f commit fc18eeb
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 35 deletions.
38 changes: 9 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,22 @@ on:
branches: [ "main" ]

jobs:
build-engine:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: build
run: cd engine && make enginetest
run: make

test-engine:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: build
run: cd engine && make test

build-initial-population:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: build
run: cd initial-population && make

build-evolve:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: build
run: cd evolve && make

test-evolve:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: build
run: cd evolve && make test
with:
submodules: true
- name: test
run: make test
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
all: pcg
cd engine; $(MAKE)
cd initial-population; $(MAKE)
cd evolve; $(MAKE)

clean:
cd engine; $(MAKE) clean
cd initial-population; $(MAKE) clean
cd evolve; $(MAKE) clean
cd pcg-c/src; $(MAKE) clean

test: pcg
cd engine; $(MAKE) enginetest
cd engine; $(MAKE) test
cd evolve; $(MAKE) test

pcg:
cd pcg-c/src; $(MAKE)
4 changes: 2 additions & 2 deletions engine/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS = -Wall -Wshadow -O3 -g -march=native
LDLIBS = -lm -lpcg_random
CFLAGS = -Wall -Wshadow -O3 -g -march=native -I../pcg-c/include
LDLIBS = -L../pcg-c/src -lm -lpcg_random

OBJS = brown.o gtp.o genann.o generate_move.o interface.o

Expand Down
4 changes: 2 additions & 2 deletions evolve/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS = -Wall -Wshadow -O3 -g -march=native
LDLIBS = -lm -lpcg_random
CFLAGS = -Wall -Wshadow -O3 -g -march=native -I../pcg-c/include
LDLIBS = -L../pcg-c/src -lm -lpcg_random

OBJS = genann.o evolve.o

Expand Down
1 change: 1 addition & 0 deletions evolve/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SOFTWARE.
*/

#include <math.h>
#include <stdlib.h>

#include "evolve.h"
Expand Down
4 changes: 2 additions & 2 deletions initial-population/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS = -Wall -Wshadow -O3 -g -march=native
LDLIBS = -lm -lpcg_random
CFLAGS = -Wall -Wshadow -O3 -g -march=native -I../pcg-c/include
LDLIBS = -L../pcg-c/src -lm -lpcg_random

OBJS = genann.o

Expand Down

0 comments on commit fc18eeb

Please sign in to comment.