Homework 06: str
This commit is contained in:
parent
f82bac6ce0
commit
bc2a9bfb81
4 changed files with 121 additions and 19 deletions
|
|
@ -13,21 +13,27 @@ all: $(TARGETS)
|
|||
# TODO: Add rules for libstr.a libstr.so
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
str.o:
|
||||
str.o: str.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
libstr.so:
|
||||
libstr.so: str.o
|
||||
$(LD) $(LDFLAGS) -shared -o $@ $<
|
||||
|
||||
libstr.a:
|
||||
libstr.a: str.o
|
||||
$(AR) $(ARFLAGS) $@ $<
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# TODO: Add rules for trit.dynamic trit.static
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
trit.o:
|
||||
trit.o: trit.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
trit.dynamic:
|
||||
trit.dynamic: trit.o
|
||||
$(LD) $(LDFLAGS) -o $@ $< -lstr
|
||||
|
||||
trit.static:
|
||||
trit.static: trit.o libstr.a
|
||||
$(LD) -o $@ $< libstr.a
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# DO NOT MODIFY BELOW
|
||||
|
|
|
|||
Loading…
Reference in a new issue