1 |
# $Id: Makefile 322 2024-10-14 17:41:06Z nishi $ |
2 |
|
3 |
OBJ=o |
4 |
STATIC=a |
5 |
AR_FLAGS=rcs |
6 |
AR_PROC=cat |
7 |
AR_USUAL=rcs |
8 |
include $(PWD)/Platform/$(PLATFORM).mk |
9 |
|
10 |
.PHONY: all clean |
11 |
.SUFFIXES: .c .$(OBJ) |
12 |
|
13 |
OBJS = string.$(OBJ) log.$(OBJ) dir.$(OBJ) |
14 |
|
15 |
all: common.$(STATIC) |
16 |
|
17 |
common.a: $(OBJS) |
18 |
rm -f common.a |
19 |
$(AR) $(AR_USUAL) $@ `echo $(OBJS) | $(AR_PROC)` |
20 |
$(MAYBE_RANLIB) |
21 |
|
22 |
common.lib: $(OBJS) |
23 |
rm -f common.lib |
24 |
$(AR) $(AR_FLAGS)$@ `echo $(OBJS) | $(AR_PROC)` |
25 |
|
26 |
.c.$(OBJ): |
27 |
$(CC) $(CFLAGS) -c -o $@ $< |
28 |
|
29 |
clean: |
30 |
rm -f *.o *.a *.lib *.obj |