StoneAge/gmsv/item/makefile
2018-08-12 23:06:36 -07:00

46 lines
724 B
Makefile

INCFLAGS=-I. -I../include
CFLAGS=-w -O3 $(INCFLAGS)
PROG=libitem.a
SRC=item.c item_event.c item_gen.c item_trade.c item_contract.c
OBJ=$(SRC:.c=.o)
ifeq (0,$(MAKELEVEL))
CC=gcc
RM=rm -f
AR=ar cr
MV=mv
RANLIB=ranlib
SED=sed
SHELL=/bin/sh
endif
all: $(PROG)
$(PROG): $(OBJ)
$(RM) $(PROG)
$(AR) $(PROG) $(OBJ)
$(RANLIB) $(PROG)
depend:
$(MV) makefile makefile.bak
$(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile
$(CC) $(INCFLAGS) -M $(SRC) >> makefile
clean:
$(RM) $(PROG)
$(RM) $(OBJ)
$(RM) *~
distclean:
$(RM) $(PROG)
$(RM) $(OBJ)
$(RM) *~
$(MV) makefile Makefile.bak
$(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile
$(RM) makefile.bak
# DO NOT DELETE THIS LINE