mirror of https://github.com/flysand7/ciabatta.git
Restore makefile because it has better comptimes
This commit is contained in:
parent
14c3e8b758
commit
0d58124c26
|
@ -0,0 +1,20 @@
|
|||
|
||||
GNUFLAGS=-Werror -Wall -Iinc -Isrc/win
|
||||
CLFLAGS=/I:inc /I:src/win /link /incremental:no /subsystem:windows /nodefaultlib kernel32.lib
|
||||
|
||||
CC=clang
|
||||
CFLAGS=$(GNUFLAGS)
|
||||
LDFLAGS=/nologo /nodefaultlib /entry:mainCRTStartup
|
||||
|
||||
SRC_DIR := src
|
||||
OBJ_DIR := bin
|
||||
SRC_FILES := $(wildcard $(SRC_DIR)/code/*.c) $(wildcard $(SRC_DIR)/win/*.c)
|
||||
OBJ_FILES := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.obj,$(SRC_FILES))
|
||||
|
||||
ciabatta.lib: $(OBJ_FILES)
|
||||
lib $(LDFLAGS) /out:$@ $^
|
||||
|
||||
$(OBJ_DIR)/%.obj: $(SRC_DIR)/%.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
.PHONY: ciabatta.lib
|
10
inc/stdlib.h
10
inc/stdlib.h
|
@ -101,11 +101,11 @@ void qsort(
|
|||
);
|
||||
|
||||
// Multibyte strings
|
||||
// int mblen(const char *s, size_t n);
|
||||
// int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n);
|
||||
// int wctomb(char *s, wchar_t wchar);
|
||||
// size_t mbstowcs(wchar_t * restrict pwcs, const char * restrict s, size_t n);
|
||||
// size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n);
|
||||
int mblen (const char *s, size_t n);
|
||||
int mbtowc (wchar_t *restrict pwc, const char *restrict s, size_t n);
|
||||
size_t mbstowcs(wchar_t *restrict pwcs, const char *restrict s, size_t n);
|
||||
int wctomb (char *s, wchar_t wchar);
|
||||
size_t wcstombs(char *restrict s, const wchar_t *restrict pwcs, size_t n);
|
||||
|
||||
// #ifdef __STDC_WANT_LIB_EXT1__
|
||||
// typedef void (*constraint_handler_t)(const char * restrict msg, void * restrict ptr, errno_t error);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
int mblen(const char *s, size_t n) {
|
||||
return mbtowc((wchar_t*)0, s, n);
|
||||
}
|
||||
|
||||
int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n) {
|
||||
|
||||
}
|
||||
|
||||
size_t mbstowcs(wchar_t *restrict pwcs, const char *restrict s, size_t n) {
|
||||
|
||||
}
|
||||
|
||||
int wctomb(char *s, wchar_t wchar) {
|
||||
|
||||
}
|
||||
|
||||
size_t wcstombs(char *restrict s, const wchar_t *restrict pwcs, size_t n) {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue