1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#
# Makefile for GAPS packages
#
#
# Before this Makefile is included ...
# $(NAME) should be module name
# $(CCSRCS) should list C++ source files
# $(CSRCS) should list C source files
#
# For example ...
# NAME=foo
# CCSRCS=$(NAME).C \
# foo1.C foo2.C foo3.C
# CSRCS=foo4.c foo5.c
#
#
# Set up compiler options, etc.
#
include ../../scripts/Makefile.std
#
# Set up target name
#
LIB=$(LIB_DIR)/lib$(NAME).a
#
# Make targets
#
opt:
$(MAKE) $(LIB) "CFLAGS=$(OPT_CFLAGS) $(CFLAGS)"
debug:
$(MAKE) $(LIB) "CFLAGS=$(DEBUG_CFLAGS) $(CFLAGS)"
$(LIB): $(CCSRCS) $(CSRCS) $(OSRCS) $(OBJS)
mkdir -p $(LIB_DIR)
rm -f $(LIB)
ar ur $(LIB) $(OBJS) $(USER_OBJS)
release:
mkdir -p $(RELEASE_DIR)/pkgs
mkdir $(RELEASE_DIR)/pkgs/$(NAME)1
cp *.[cCIh] $(RELEASE_DIR)/pkgs/$(NAME)1
cp Makefile $(RELEASE_DIR)/pkgs/$(NAME)1
rm -r -f $(RELEASE_DIR)/pkgs/$(NAME)
mv $(RELEASE_DIR)/pkgs/$(NAME)1 $(RELEASE_DIR)/pkgs/$(NAME)
clean:
- rm -f *~ *.o $(LIB)
|