fix the order of gcc command line args; -lfoo must be later than src/*.c
This commit is contained in:
parent
edcd060a8a
commit
013060a06f
4
Makefile
4
Makefile
|
@ -5,13 +5,13 @@ all: build run
|
||||||
build: build-lib build-main
|
build: build-lib build-main
|
||||||
|
|
||||||
build-main:
|
build-main:
|
||||||
$(CC) -Wall -g -o bin/picrin -I./include -L./lib -lpicrin -lreadline tools/main.c
|
$(CC) -Wall -g tools/main.c -o bin/picrin -I./include -L./lib -lpicrin -lreadline
|
||||||
|
|
||||||
build-lib:
|
build-lib:
|
||||||
cd src; \
|
cd src; \
|
||||||
yacc -d parse.y; \
|
yacc -d parse.y; \
|
||||||
lex scan.l
|
lex scan.l
|
||||||
$(CC) -Wall -g -shared -o lib/libpicrin.so -I./include -I./extlib src/*.c
|
$(CC) -Wall -g -shared src/*.c -o lib/libpicrin.so -I./include -I./extlib
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f src/y.tab.c src/y.tab.h src/lex.yy.c
|
rm -f src/y.tab.c src/y.tab.h src/lex.yy.c
|
||||||
|
|
Loading…
Reference in New Issue