64 lines
1.1 KiB
Makefile
64 lines
1.1 KiB
Makefile
#
|
|
# $Id: makefile.in,v 1.3 2007/04/30 08:32:50 bacon Exp $
|
|
#
|
|
|
|
NAME = aseutl
|
|
|
|
TOP_DIR = @abs_top_builddir@
|
|
|
|
CC = @CC@
|
|
AR = @AR@
|
|
MAKE = @MAKE@
|
|
RANLIB = @RANLIB@
|
|
CFLAGS = @CFLAGS@ -I$(TOP_DIR)/inc
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS = @LIBS@
|
|
MODE = @BUILDMODE@
|
|
|
|
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
|
|
OUT_FILE = $(OUT_DIR)/lib$(NAME).a
|
|
|
|
TMP_DIR = $(MODE)
|
|
|
|
OBJ_FILES = \
|
|
$(TMP_DIR)/main.o \
|
|
$(TMP_DIR)/ctype.o \
|
|
$(TMP_DIR)/stdio.o \
|
|
$(TMP_DIR)/http.o \
|
|
$(TMP_DIR)/getopt.o \
|
|
$(TMP_DIR)/assert.o
|
|
|
|
lib: $(OUT_FILE)
|
|
|
|
$(OUT_FILE): $(TMP_DIR) $(OBJ_FILES) $(OUT_DIR)
|
|
$(AR) cr $(OUT_FILE) $(OBJ_FILES)
|
|
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE); fi
|
|
|
|
$(TMP_DIR)/main.o: main.c
|
|
$(CC) $(CFLAGS) -o $@ -c main.c
|
|
|
|
$(TMP_DIR)/ctype.o: ctype.c
|
|
$(CC) $(CFLAGS) -o $@ -c ctype.c
|
|
|
|
$(TMP_DIR)/stdio.o: stdio.c
|
|
$(CC) $(CFLAGS) -o $@ -c stdio.c
|
|
|
|
$(TMP_DIR)/http.o: http.c
|
|
$(CC) $(CFLAGS) -o $@ -c http.c
|
|
|
|
$(TMP_DIR)/getopt.o: getopt.c
|
|
$(CC) $(CFLAGS) -o $@ -c getopt.c
|
|
|
|
$(TMP_DIR)/assert.o: assert.c
|
|
$(CC) $(CFLAGS) -o $@ -c assert.c
|
|
|
|
$(OUT_DIR):
|
|
mkdir -p $(OUT_DIR)
|
|
|
|
$(TMP_DIR):
|
|
mkdir -p $(TMP_DIR)
|
|
|
|
clean:
|
|
rm -rf $(OUT_FILE) $(OBJ_FILES)
|
|
|