2004-02-16 21:25:11 +00:00
|
|
|
### HEADER HERE
|
|
|
|
|
2004-02-19 18:27:41 +00:00
|
|
|
OS=$(shell uname -s)
|
2004-02-16 21:25:11 +00:00
|
|
|
CC=gcc
|
2004-02-19 09:57:25 +00:00
|
|
|
CFLAGS=-ggdb -Wall -O2
|
2004-02-17 21:53:14 +00:00
|
|
|
#-O2
|
|
|
|
#LIBS=-lrt
|
2004-02-16 21:25:11 +00:00
|
|
|
#-verbose
|
|
|
|
PRJNAME=Libnazgul
|
|
|
|
GDATE := $(shell date +"-%Y-%m-%d_r%H")
|
|
|
|
GFILENAME := ../$(PRJNAME)$(GDATE).tar.bz2
|
|
|
|
LOCALDIR = $(shell pwd)
|
|
|
|
BINDIR=../bin
|
|
|
|
CFILES := $(shell ls *.c)
|
|
|
|
OFILES := $(patsubst %.c,%.o,$(CFILES))
|
2004-02-17 16:32:06 +00:00
|
|
|
DESTFILE=libnazgul.a
|
2004-02-16 21:25:11 +00:00
|
|
|
|
2004-02-19 18:27:41 +00:00
|
|
|
DEFINES:=
|
|
|
|
|
|
|
|
ifeq "SunOS" "${OS}"
|
|
|
|
DEFINES:=-D_NZG_REALFILEID
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq "HP-UX" "${OS}"
|
|
|
|
DEFINES:=-D_NZG_REALFILEID
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq "Linux" "${OS}"
|
|
|
|
#DEFINES:=-D_NZG_REALFILEID
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2004-02-16 21:25:11 +00:00
|
|
|
all: build
|
|
|
|
|
|
|
|
build : $(OFILES)
|
2004-02-17 16:32:06 +00:00
|
|
|
ar rc $(DESTFILE) $(OFILES)
|
|
|
|
ranlib $(DESTFILE)
|
2004-02-16 21:25:11 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo -e "Cleaning..."
|
2004-02-17 16:32:06 +00:00
|
|
|
@rm -f *.a
|
2004-02-16 21:25:11 +00:00
|
|
|
@rm -f *.o
|
|
|
|
|
|
|
|
%.o : %.c
|
2004-02-19 18:27:41 +00:00
|
|
|
$(CC) $(CFLAGS) -c $< $(INCLUDES) $(LIBINC) $(LIBS) $(DEFINES) -o $*.o
|
2004-02-16 21:25:11 +00:00
|
|
|
|
2004-02-19 18:27:41 +00:00
|
|
|
edit:
|
|
|
|
gvim *.c *.h
|