mirror of
https://github.com/rkujawa/rk65c02.git
synced 2025-01-10 18:29:53 +00:00
Also build static library and use it for tests.
This commit is contained in:
parent
64e71a081f
commit
a0821195c7
14
src/Makefile
14
src/Makefile
@ -1,15 +1,21 @@
|
||||
OBJS=rk65c02.o bus.o
|
||||
SO=librk65c02.so
|
||||
LIB_SO=librk65c02.so
|
||||
LIB_STATIC=librk65c02.a
|
||||
LDFLAGS=-shared
|
||||
CFLAGS=-Wall -fpic
|
||||
|
||||
$(SO) : $(OBJS)
|
||||
$(CC) -o $(SO) $(LDFLAGS) $(OBJS)
|
||||
all : $(LIB_SO) $(LIB_STATIC)
|
||||
|
||||
$(LIB_SO) : $(OBJS)
|
||||
$(CC) -o $(LIB_SO) $(LDFLAGS) $(OBJS)
|
||||
|
||||
$(LIB_STATIC) : $(OBJS)
|
||||
$(AR) rcs $(LIB_STATIC) $(OBJS)
|
||||
|
||||
%.o : %.c %.h
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
clean :
|
||||
rm -f $(OBJS)
|
||||
rm -f $(SO)
|
||||
rm -f $(LIB_SO) $(LIB_STATIC)
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
CFLAGS=-Wall -I../src
|
||||
LDFLAGS=-L../src/ -latf-c -lrk65c02
|
||||
#-Wl,-R../src/
|
||||
LDFLAGS=-latf-c ../src/librk65c02.a
|
||||
|
||||
test_bus : test_bus.o
|
||||
$(CC) -o test_bus $(LDFLAGS) $<
|
||||
|
Loading…
x
Reference in New Issue
Block a user