Changed C makefile rules to use the shared library when possible, and to fix library build rule if there is more than one .c source file.
This commit is contained in:
parent
c936e2c1de
commit
7075db21d1
|
@ -64,11 +64,11 @@ clean:
|
|||
|
||||
# Shared library
|
||||
$(LIBFILE): $(LIBSRC:=.c) $(LIBSRC:=.h)
|
||||
$(CC) $(CFLAGS) -fPIC -shared -o $@ $<
|
||||
$(CC) $(CFLAGS) -fPIC -shared -o $@ $(LIBSRC:=.c)
|
||||
|
||||
# Executable files
|
||||
%: %.c $(LIBSRC:=.c) $(LIBSRC:=.h)
|
||||
$(CC) $(CFLAGS) -o $@ $< $(LIBSRC:=.c)
|
||||
%: %.c $(LIBFILE)
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
|
||||
# Special executable
|
||||
qrcodegen-test: qrcodegen-test.c $(LIBSRC:=.c) $(LIBSRC:=.h)
|
||||
|
|
Loading…
Reference in New Issue