1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-06-08 21:29:31 +00:00

Also build static library and use it for tests.

This commit is contained in:
Radosław Kujawa 2017-01-16 23:54:46 +01:00
parent 64e71a081f
commit a0821195c7
2 changed files with 11 additions and 6 deletions

View File

@ -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)

View File

@ -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) $<