Skip to content
Extraits de code Groupes Projets
Valider 0526b788 rédigé par Jonathan CROUZET's avatar Jonathan CROUZET
Parcourir les fichiers

Added Makefile and renamed some files

parent 1557a709
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
## Makefile to build C example programs included with the COCO distribution
##
## NOTE: We have tried to make this Makefile as generic and portable
## as possible. However, there are many (incompatible) versions of
## make floating around. We regularly test using GNU make and BSD make
## from FreeBSD. If you have trouble compiling the examples, please
## try to use GNU make.
##
## On Windows it is best to use either the included NMakefile by running
##
## nmake -f NMakefile
##
## or installing Cygwin and running GNU make from within Cygwin.
CC = gcc
CXX = g++
LDFLAGS += -lm
CCFLAGS = -g -ggdb -std=c89 -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion
LDFLAGS = -lm
FLAGS = -g -ggdb -Iexternals/coco -Isrc
FLAGS += -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion
SRC = src
BIN = bin
OBJS = $(BIN)/coco.o $(BIN)/experiment.o
########################################################################
## Toplevel targets
all: experiment
clean:
rm -f coco.o
rm -f experiment.o experiment
rm -f bin/*
########################################################################
## Programs
experiment: example_experiment.o coco.o
${CC} ${CCFLAGS} -o experiment coco.o experiment.o ${LDFLAGS}
experiment: $(OBJS)
${CC} ${FLAGS} $(OBJS) ${LDFLAGS} -o $(BIN)/$@
########################################################################
## Additional dependencies
coco.o: coco.h coco.c
${CC} -c ${CCFLAGS} -o coco.o coco.c
experiment.o: coco.h coco.c example_experiment.c
${CC} -c ${CCFLAGS} -o experiment.o experiment.c
\ No newline at end of file
$(BIN)/coco.o: $(SRC)/coco/coco.h $(SRC)/coco/coco.c
${CC} -c $(SRC)/coco/coco.c $(FLAGS) -o $@
$(BIN)/experiment.o: $(SRC)/coco/coco.h $(SRC)/experiment.c
${CC} -c $(SRC)/experiment.c ${FLAGS} -o $@
......@@ -9,7 +9,7 @@
#include <string.h>
#include <time.h>
#include "coco.h"
#include "coco/coco.h"
/**
* The maximal budget for evaluations done by an optimization algorithm equals dimension * BUDGET_MULTIPLIER.
......
Fichier déplacé
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter