fix shared makefile regarding static linking and proper test target linking

This commit is contained in:
Andreas Gieriet 2020-02-22 01:52:51 +01:00
parent 2e878d8489
commit a9bc693814
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ FULLTARGET := $(CURDIR)/$(TARGET)
CC = gcc CC = gcc
CFLAGS = -std=c99 -Wall -pedantic -g CFLAGS = -std=c99 -Wall -pedantic -g
CPPFLAGS = -MD -Isrc -Itests -I$(TSTINCDIR) -DTARGET=$(FULLTARGET) CPPFLAGS = -MD -Isrc -Itests -I$(TSTINCDIR) -DTARGET=$(FULLTARGET)
LDFLAGS = LDFLAGS = -static
# targets which get always visited (without checking any up-to-date state) # targets which get always visited (without checking any up-to-date state)
.PHONY: default clean test doc install mkdir .PHONY: default clean test doc install mkdir
@ -49,7 +49,7 @@ test: $(TSTTARGET)
@echo "#### $< executed ####" @echo "#### $< executed ####"
$(TSTTARGET): $(FULLTARGET) $(TSTOBJECTS) $(TSTTARGET): $(FULLTARGET) $(TSTOBJECTS)
$(LINK.c) -o $(TSTTARGET) $(TSTOBJECTS) $(FULLTARGET) -lcunit -L$(TSTLIBDIR) -lsnptest $(LINK.c) -o $(TSTTARGET) $(TSTOBJECTS) -lcunit -L$(TSTLIBDIR) -lsnptest
@echo "#### $@ built ####" @echo "#### $@ built ####"