Skip to content

Commit

Permalink
Fix errors in C code.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Nov 20, 2024
1 parent d3c9f96 commit 38ebc96
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ API-doc/
*.dll
*.so
*.dylib
*.exe

*.egg-info
__pycache__
Expand Down
4 changes: 2 additions & 2 deletions C/example/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

CFLAGS=-O3 -funroll-loops -fmax-errors=1

all: example

example: example.c
gcc -I../include -L../build/ -lcodata $(CFLAGS_RELEASE) $(FPM_CFLAGS) $< -o $@
gcc -I../include -L../build/ -lcodata $(CFLAGS) $(FPM_CFLAGS) $< -o ../build/$@
Binary file removed C/example/example.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion C/include/codata_version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef CODATA_VERSION_H
#define CODATA_VERSION_H
const char version[32] = "2.0.0";
const char version[32] = 2.0.0
#endif
4 changes: 2 additions & 2 deletions C/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ codata_constants_2022.c: $(AST_DIR)/codata_2022.toml
$(PY) $(GEN) $< $@

$(CBUILD_DIR)/%.o: %.c
gcc -c -I ../include $(CFLAGS_RELEASE) $(FPM_CFLAGS) $< -o $@
gcc -c -I../include $(CFLAGS_RELEASE) $(FPM_CFLAGS) $< -o $@

$(CBUILD_DIR)/$(LIBNAME).a: $(C_OBJ)
ar -rs $@ $^
ar -crs $@ $^

shared: build shared_$(PLATFORM)

Expand Down

0 comments on commit 38ebc96

Please sign in to comment.