Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojTGN committed Apr 8, 2023
1 parent c42f237 commit 08bbb65
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ test/
build/
.vscode/

makefile
cmakelists.txt
35 changes: 35 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

CC = gcc
CFLAGS = -lgdi32 -lfreetype
BINS = grafix.so grafix.a clean

all: $(BINS)

grafix.so: src/grafix.c src/shapes.c src/event.c src/time.c src/image.c src/font.c
$(CC) $(CFLAGS) -fPIC -shared -o build/grafix.so src/grafix.c src/shapes.c src/event.c src/time.c src/image.c src/font.c $(CFLAGS) $(CINCLUDES)


grafix.a: grafix.o shapes.o event.o time.o image.o font.o
ar rcs build/libgrafix.a build/grafix.o build/shapes.o build/event.o build/time.o build/image.o build/font.o

grafix.o: src/grafix.c
$(CC) -c src/grafix.c -o build/grafix.o $(CFLAGS)

shapes.o: src/shapes.c
$(CC) -c src/shapes.c -o build/shapes.o $(CFLAGS)

event.o: src/event.c
$(CC) -c src/event.c -o build/event.o $(CFLAGS)

time.o: src/time.c
$(CC) -c src/time.c -o build/time.o $(CFLAGS)

image.o: src/image.c
$(CC) -c src/image.c -o build/image.o $(CFLAGS)

font.o: src/font.c
$(CC) -c src/font.c -o build/font.o $(CFLAGS)


clean:
rm build/*.o $(BINS)

0 comments on commit 08bbb65

Please sign in to comment.