Rev | Line | |
---|
[439] | 1 | ############################################################################ |
---|
[445] | 2 | # Makefile for the "pthread" library. # |
---|
[439] | 3 | ############################################################################ |
---|
| 4 | |
---|
| 5 | -include ../../params-soft.mk |
---|
[445] | 6 | |
---|
[439] | 7 | ifeq ($(ARCH_NAME),) |
---|
| 8 | $(error Please define in ARCH_NAME parameter in params-soft.mk!) |
---|
| 9 | endif |
---|
| 10 | |
---|
| 11 | SRCS = pthread.c |
---|
| 12 | |
---|
[445] | 13 | OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ |
---|
| 14 | $(HAL_ARCH)/build/core/hal_user.o |
---|
[439] | 15 | |
---|
[445] | 16 | INCLUDES = -I. \ |
---|
| 17 | -I$(LIBC_PATH) \ |
---|
| 18 | -I$(LIBALMOSMKH_PATH) \ |
---|
| 19 | -I$(SHARED_INCLUDE) \ |
---|
| 20 | -I$(HAL)/generic \ |
---|
| 21 | -I$(HAL_ARCH)/core \ |
---|
| 22 | -I$(KERNEL) |
---|
[439] | 23 | |
---|
[445] | 24 | libs : build/lib/libpthread.a headers |
---|
| 25 | |
---|
[439] | 26 | build : |
---|
| 27 | @mkdir build |
---|
| 28 | @mkdir build/lib |
---|
| 29 | @mkdir build/include |
---|
| 30 | |
---|
| 31 | $(HAL_ARCH)/build/core/hal_user.o : |
---|
| 32 | $(MAKE) -C $(HAL_ARCH) |
---|
| 33 | |
---|
| 34 | build/%.o : %.c %.h |
---|
| 35 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
| 36 | $(DU) -D $@ > $@.txt |
---|
| 37 | |
---|
[444] | 38 | headers: build |
---|
[445] | 39 | cp $(SRCS:.c=.h) build/include/. |
---|
[444] | 40 | |
---|
| 41 | |
---|
[445] | 42 | build/lib/libpthread.a: build $(OBJS) |
---|
| 43 | $(AR) rc $@ $(OBJS) |
---|
[440] | 44 | $(RANLIB) $@ |
---|
[439] | 45 | |
---|
[444] | 46 | .PHONY = build clean headers |
---|
[439] | 47 | |
---|
| 48 | |
---|
| 49 | clean: |
---|
[444] | 50 | rm -rf build/ |
---|
Note: See
TracBrowser
for help on using the repository browser.