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