From 1833b3dd63df7505630f9e40cc845a9468e77137 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sun, 30 Jul 2023 11:36:22 +0800 Subject: Fix makefile's. Fix the broken Makefiles. --- src/Makefile.am | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 114b168..94399cb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,8 +2,21 @@ CC=gcc CFLAGS=-g -O0 -rep.so: binding.c ../target/debug/librep.dylib helper.o big_endian.o - $(CC) $(CFLAGS) $+ -shared -export-dynamic -o $@ +REPLIB=../target/debug/librep.dylib + +all: rep.so + +rs: + cargo build + +rep.so: binding.c rs $(REPLIB) helper.o big_endian.o + $(CC) $(CFLAGS) binding.c $(REPLIB) helper.o big_endian.o -shared -export-dynamic -o $@ + +big_endian.o: big_endian.c big_endian.h + $(CC) $(CFLAGS) -c $< -o $@ + +helper.o: helper.c helper.h big_endian.o + $(CC) $(CFLAGS) -c helper.c -o $@ test: test.c ../target/debug/librep.dylib helper.o big_endian.o $(CC) $(CFLAGS) $+ -o $@ @@ -11,10 +24,10 @@ test: test.c ../target/debug/librep.dylib helper.o big_endian.o .PHONY: clean rs windows clean: - rm *.o - -rs: - cargo build + -rm -f *.o + -rm -f rep.so + -rm -f test + cargo clean windows: cargo build --target=x86_64-pc-windows-gnu -- cgit v1.2.3-18-g5258