Skip to content

Commit

Permalink
Add example in C makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Nov 20, 2024
1 parent e0a414d commit 4aed980
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ build:
mkdir -p $(BUILD_DIR)
make -C src

example: sources headers build
make -C example

clean:
make -C include clean
make -C src clean
5 changes: 5 additions & 0 deletions C/example/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CFLAGS=-O3 -funroll-loops -fmax-errors=1

.PHONY: clean

all: example

example: example.c
gcc -I../include -L../build/ -lcodata $(CFLAGS) $(FPM_CFLAGS) $< -o ../build/$@

clean:
rm -rf ./build/example*

0 comments on commit 4aed980

Please sign in to comment.