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

51 lines
926 B
Makefile

INCFLAGS=-I.. -I../include
CFLAGS=-w -O3 $(INCFLAGS)
PROG=libchar.a
SRC=char_base.c char.c char_event.c char_data.c skill.c title.c\
addressbook.c chatmagic.c event.c char_walk.c encount.c pet.c \
enemy.c pet_event.c char_talk.c char_party.c char_item.c deathcontend.c \
chatroom.c petmail.c trade.c family.c defend.c char_angel.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