Changes in uspace/Makefile.common [7e69e0e:a047aaa] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
r7e69e0e ra047aaa 78 78 JOB = $(BINARY).job 79 79 OUTPUT = $(BINARY) 80 TEST_BINARY = test-$(BINARY) 80 81 EXTRA_OUTPUT += $(BINARY).disasm 81 82 EXTRA_CLEAN += $(BINARY).map … … 85 86 JOB = $(LIBRARY).job 86 87 OUTPUT = $(LIBRARY).a 88 TEST_BINARY = test-$(LIBRARY) 87 89 endif 88 90 … … 142 144 LIBNIC_PREFIX = $(LIB_PREFIX)/nic 143 145 LIBMINIX_PREFIX = $(LIB_PREFIX)/minix 146 LIBCOMPRESS_PREFIX = $(LIB_PREFIX)/compress 144 147 145 148 LIBSCSI_PREFIX = $(LIB_PREFIX)/scsi … … 201 204 endif 202 205 206 # PCUT-based unit tests 207 ifneq ($(TEST_SOURCES),) 208 TEST_OUTPUT = $(TEST_BINARY) 209 TEST_CFLAGS = -I$(LIB_PREFIX)/pcut/include -D__helenos__ 210 TEST_OUTPUT_LIBS = $(LIB_PREFIX)/pcut/libpcut.a 211 EXTRA_CLEAN += $(TEST_OUTPUT) $(TEST_OUTPUT).map 212 ifneq ($(LIBRARY),) 213 TEST_OUTPUT_LIBS += $(OUTPUT) 214 endif 215 TEST_OUTPUT_LIBS += $(TEST_LIBS) 216 endif 217 203 218 .PHONY: all clean 204 219 205 220 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT) 206 221 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV) 222 223 all-test: $(TEST_OUTPUT) 207 224 208 225 clean: … … 295 312 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 296 313 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES))) 314 TEST_OBJECTS := $(addsuffix .test.o,$(basename $(TEST_SOURCES))) 297 315 298 316 ifneq ($(BINARY),) … … 339 357 endif 340 358 359 ifneq ($(TEST_OUTPUT),) 360 $(TEST_OUTPUT): $(LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_OUTPUT_LIBS) 361 $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(TEST_OUTPUT).map -o $@ $(TEST_OBJECTS) $(TEST_OUTPUT_LIBS) $(LIBS) $(BASE_LIBS) 362 ifeq ($(CONFIG_STRIP_BINARIES),y) 363 $(STRIP) $(TEST_OUTPUT) 364 endif 365 endif 366 341 367 %.o: %.S $(DEPEND) 342 368 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@ … … 357 383 endif 358 384 385 %.test.o: %.c $(DEPEND) 386 $(CC) $(DEFS) $(CFLAGS) $(TEST_CFLAGS) -c $< -o $@ 387 ifeq ($(PRECHECK),y) 388 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 389 endif 390 359 391 %.lo: %.S $(DEPEND) 360 392 $(CC) $(DEFS) $(LIB_CFLAGS) -D__ASM__ -c $< -o $@ … … 376 408 377 409 $(DEPEND): $(PRE_DEPEND) 378 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null410 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) $(TEST_SOURCES) > $@ 2> /dev/null 379 411 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 380 412
Note:
See TracChangeset
for help on using the changeset viewer.