new build system
This commit is contained in:
parent
be9e6d3213
commit
e82070ed99
13
Makefile
13
Makefile
@ -1,13 +0,0 @@
|
|||||||
objects = coreutils console-tools networking procps shell
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: $(objects)
|
|
||||||
|
|
||||||
$(objects):
|
|
||||||
echo MAKE $@
|
|
||||||
cd $@ && $(MAKE) -B CC="$(CC)" CFLAGS="$(CFLAGS) -I../libmu" && cd ..
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm bin/*
|
|
@ -1,2 +1,10 @@
|
|||||||
# micro-utils
|
# micro-utils
|
||||||
|
[Compile]
|
||||||
|
cc builder.c -obuilder
|
||||||
|
./buulder
|
||||||
|
|
||||||
|
[or]
|
||||||
|
sh build.sh
|
||||||
|
|
||||||
|
[Config]
|
||||||
|
edit config.h
|
||||||
|
3
build.sh
Executable file
3
build.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cc builder.c -Wall -Wextra -Os -s -pedantic -obuilder
|
||||||
|
./builder && rm builder
|
7
builder.c
Normal file
7
builder.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
return 0;
|
||||||
|
}
|
14
config.h
Normal file
14
config.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#ifndef _CONFIG_H
|
||||||
|
#define _CONFIG_H
|
||||||
|
|
||||||
|
const char *objects[] = {
|
||||||
|
"console-tools",
|
||||||
|
"coreutils",
|
||||||
|
"networking",
|
||||||
|
"procps",
|
||||||
|
"shell"
|
||||||
|
};
|
||||||
|
|
||||||
|
#define CFLAGS "-Wall -Wextra -pedantic -Os -s"
|
||||||
|
#define CC "cc"
|
||||||
|
#endif
|
@ -1,11 +0,0 @@
|
|||||||
C_SOURCES:=$(wildcard ./*.c)
|
|
||||||
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
||||||
TARGETS:=$(C_TARGETS)
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: ../bin $(TARGETS)
|
|
||||||
|
|
||||||
../bin/%: %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
@ -1,11 +0,0 @@
|
|||||||
C_SOURCES:=$(wildcard ./*.c)
|
|
||||||
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
||||||
TARGETS:=$(C_TARGETS)
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: ../bin $(TARGETS)
|
|
||||||
|
|
||||||
../bin/%: %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
@ -1,11 +0,0 @@
|
|||||||
C_SOURCES:=$(wildcard ./*.c)
|
|
||||||
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
||||||
TARGETS:=$(C_TARGETS)
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: ../bin $(TARGETS)
|
|
||||||
|
|
||||||
../bin/%: %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
@ -1,11 +0,0 @@
|
|||||||
C_SOURCES:=$(wildcard ./*.c)
|
|
||||||
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
||||||
TARGETS:=$(C_TARGETS)
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: ../bin $(TARGETS)
|
|
||||||
|
|
||||||
../bin/%: %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
@ -1,11 +0,0 @@
|
|||||||
C_SOURCES:=$(wildcard ./*.c)
|
|
||||||
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
||||||
TARGETS:=$(C_TARGETS)
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: ../bin $(TARGETS)
|
|
||||||
|
|
||||||
../bin/%: %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
@ -1,11 +0,0 @@
|
|||||||
C_SOURCES:=$(wildcard ./*.c)
|
|
||||||
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
||||||
TARGETS:=$(C_TARGETS)
|
|
||||||
|
|
||||||
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
||||||
CC?=cc
|
|
||||||
|
|
||||||
all: ../bin $(TARGETS)
|
|
||||||
|
|
||||||
../bin/%: %.c
|
|
||||||
$(CC) $(CFLAGS) -o $@ $<
|
|
Loading…
Reference in New Issue
Block a user