Skip to content

Commit

Permalink
add cmake to compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker2770 committed Nov 19, 2020
1 parent e8e9570 commit 589ae39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ x64/
x86/
bld/
[Bb]in/
[Bb]uild/
[Oo]bj/
[Ll]og/

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
cc = gcc
prom = morse-encode-and-decode
CFLAGS=-I ./include
deps = $(shell find ./include -name "*.h")
deps = $(shell find ./src -name "*.h")
src = $(shell find ./src -name "*.c")
obj = $(src:%.c=%.o)

$(prom): $(obj)
$(cc) -o $(prom) $(obj)

%.o: %.c $(deps)
$(cc) $(CFLAGS) -Wall -g -fPIC -shared -o $@ -c $<
$(cc) -Wall -g -fPIC -shared -o $@ -c $<

clean:
rm -rf $(obj) $(prom)

install:
cp $(prom) /usr/local/bin
cp $(prom) /usr/local/bin

File renamed without changes.

0 comments on commit 589ae39

Please sign in to comment.