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

47 lines
713 B
Makefile

INCFLAGS=-I.. -I../include
CFLAGS=-w -O3 $(INCFLAGS)
PROG=libmap.a
SRC=readmap.c map_deal.c map_util.c map_warppoint.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