feat: autotools (#10)
* start configure * ignore some files * wip configure * working configure * working with dev tools * rename automake -> release * update readme * update Makefile.dev
This commit is contained in:
+4
-4
@@ -1,5 +1,5 @@
|
||||
#include "args.h"
|
||||
#include "const.h"
|
||||
#include "config.h"
|
||||
#include "rand.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -7,9 +7,9 @@
|
||||
#include <time.h>
|
||||
|
||||
void print_help(int status_code) {
|
||||
puts(NAME
|
||||
puts(PACKAGE
|
||||
" " VERSION "\n\n"
|
||||
"usage: " NAME " "
|
||||
"usage: " PACKAGE " "
|
||||
"[--help] "
|
||||
"[-v] "
|
||||
"[-q] "
|
||||
@@ -145,7 +145,7 @@ parameters parse_args(int argc, char **argv) {
|
||||
} else if (is_arg(arg, "-q") || is_arg(arg, "--quiet")) {
|
||||
params.quiet = true;
|
||||
} else if (is_arg(arg, "-v") || is_arg(arg, "--version")) {
|
||||
puts(NAME " " VERSION);
|
||||
puts(PACKAGE " " VERSION);
|
||||
exit(0);
|
||||
} else if (is_arg(arg, "-w") || is_arg(arg, "--width")) {
|
||||
params.width = parse_ushort(arg, value);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#ifndef PACKAGE
|
||||
#define PACKAGE "margen"
|
||||
#endif
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION "(dev)"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef CONST_H
|
||||
#define CONST_H
|
||||
|
||||
#define NAME "margen"
|
||||
#define VERSION "v1.1.0"
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#include "args.h"
|
||||
#include "bmp.h"
|
||||
#include "const.h"
|
||||
#include "config.h"
|
||||
#include "rand.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
@@ -104,7 +104,7 @@ void print_time(parameters params, clock_t start) {
|
||||
|
||||
void generate(parameters params) {
|
||||
if (!params.quiet) {
|
||||
puts(NAME " " VERSION);
|
||||
puts(PACKAGE " " VERSION);
|
||||
}
|
||||
clock_t start = clock();
|
||||
init(params);
|
||||
|
||||
Reference in New Issue
Block a user