mirror of
https://github.com/cesanta/slre.git
synced 2025-03-14 09:25:29 +00:00
Added Makefile and .gitignore
This commit is contained in:
parent
ace9f34999
commit
9c5602e8c9
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Object files
|
||||||
|
*.o
|
||||||
|
*.ko
|
||||||
|
*.obj
|
||||||
|
*.elf
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Libraries
|
||||||
|
*.lib
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
|
|
||||||
|
# Shared objects (inc. Windows DLLs)
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.i*86
|
||||||
|
*.x86_64
|
||||||
|
*.hex
|
||||||
|
*.bin
|
||||||
|
|
||||||
|
# Debug files
|
||||||
|
*.dSYM/
|
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#####################################################
|
||||||
|
|
||||||
|
|
||||||
|
CC=gcc
|
||||||
|
|
||||||
|
all: unit_test lib
|
||||||
|
|
||||||
|
unit_test:
|
||||||
|
$(CC) -c slre.c
|
||||||
|
$(CC) -c unit_test.c
|
||||||
|
$(CC) -o unit_test.bin slre.o unit_test.o
|
||||||
|
@echo "Done. OK! run $ make test"
|
||||||
|
|
||||||
|
|
||||||
|
lib:
|
||||||
|
$(CC) -fPIC -g -c slre.c
|
||||||
|
$(CC) -shared -Wl,-soname,libslre.so -o libslre.so slre.o -lc
|
||||||
|
|
||||||
|
test:
|
||||||
|
@echo "Running unit_test.bin"
|
||||||
|
./unit_test.bin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf *.o *.bin *.out *.so
|
Loading…
Reference in New Issue
Block a user