Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c34a4a027a | ||
|
|
ac5ea1bbe9 | ||
|
|
7bb693e469 | ||
|
|
1cf98dc68d | ||
|
|
51b0904a79 | ||
|
|
673bd4d7e2 | ||
|
|
6897fda109 | ||
|
|
398bfec72d | ||
|
|
7616a0c935 | ||
|
|
96ca62f464 |
@@ -1,17 +1,34 @@
|
||||
################################################
|
||||
###
|
||||
### Makefile for GilberModel
|
||||
###
|
||||
###
|
||||
###
|
||||
################################################
|
||||
|
||||
### Projects
|
||||
PROJECTS = sqnanalyzer sqngen
|
||||
### Static Compilation
|
||||
STC?=0
|
||||
### Compilet
|
||||
CPP = g++
|
||||
#CPP = i686-pc-mingw32-g++
|
||||
|
||||
|
||||
OUTPUT_DIR := Bin
|
||||
PROJECTS := sqnanalyzer sqngen
|
||||
################################################
|
||||
# Make definitions
|
||||
################################################
|
||||
BIN_DIR = bin
|
||||
|
||||
export DBG
|
||||
export STC
|
||||
export M32
|
||||
export OPENMP
|
||||
CFLAGS= -Wall
|
||||
|
||||
ifeq ($(STC),1)
|
||||
STATIC= -static
|
||||
else
|
||||
STATIC=
|
||||
endif
|
||||
|
||||
|
||||
SQNGENLIBS= `gsl-config --libs` -lgsl -lgslcblas
|
||||
CFLAGS+= `gsl-config --cflags `$(STATIC)
|
||||
|
||||
.HONY: default all $(PROJECTS) #distclean clean tags dependP
|
||||
|
||||
@@ -19,11 +36,14 @@ default: all
|
||||
|
||||
all: $(PROJECTS)
|
||||
|
||||
sqngen:
|
||||
g++ -Wall sqngen.c -lgsl -lgslcblas -o SQNGen
|
||||
sqnanalyzer:
|
||||
g++ -Wall sqnanalyzer.c -o SQNAnalyzer
|
||||
|
||||
bin_dir:
|
||||
@echo 'Creating $(BIN_DIR) ...'
|
||||
@mkdir -p $(BIN_DIR)
|
||||
sqngen: bin_dir
|
||||
$(CPP) $(CFLAGS) sqngen.c $(SQNGENLIBS) -o $(BIN_DIR)/sqngen
|
||||
sqnanalyzer: bin_dir
|
||||
$(CPP) $(CFLAGS) sqnanalyzer.c -o $(BIN_DIR)/sqnanalyzer
|
||||
clean:
|
||||
rm SQNGen
|
||||
rm SQNAnalyzer
|
||||
@echo 'Removing $(BIN_DIR) ...'
|
||||
@rm $(BIN_DIR) -R
|
||||
|
||||
|
||||
Binary file not shown.
@@ -35,6 +35,11 @@
|
||||
#include <gsl/gsl_rng.h>
|
||||
#include <gsl/gsl_randist.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#define sleep(a) Sleep(a * 1000)
|
||||
#endif
|
||||
|
||||
#define ONE 4294967295u
|
||||
|
||||
#include <iostream>
|
||||
@@ -442,7 +447,7 @@ int main (int argc, char *argv[]) {
|
||||
int gmin_max;
|
||||
fstream data;
|
||||
char *filename_common;
|
||||
fprintf(stdout,"********************** SQNGEN (Edited by Joao Carreira) ***********************\n");
|
||||
fprintf(stdout,"********************** sqngen ***********************\n");
|
||||
if (argc<7) {
|
||||
arg_error();
|
||||
return 0;
|
||||
@@ -654,7 +659,7 @@ int main (int argc, char *argv[]) {
|
||||
data.close();
|
||||
for (int sample=0;sample<num_of_samples;sample++) {
|
||||
FILE *out_file = NULL;
|
||||
char filename[100];
|
||||
char filename[200];
|
||||
sprintf(filename,"%s_P%d_%d.dat", filename_common, (int)(ploss*1000), sample);
|
||||
out_file = fopen (filename, "w");
|
||||
if (out_file == NULL)
|
||||
@@ -780,5 +785,4 @@ int main (int argc, char *argv[]) {
|
||||
statistics(filename, num_of_samples, ploss_ter, mean_length_of_burst_ter, density_ter, pisolated_loss_ter, mean_length_of_good_burst_ter, gmin, gmin_max);
|
||||
}
|
||||
}
|
||||
fprintf(stdout,"********************************* Exit SQNGEN *********************************\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user