2004-02-16 21:25:11 +00:00
|
|
|
### HEADER HERE
|
|
|
|
|
|
|
|
# @CLASSPATH=$(CLASSPATH) $(JAVAC) $(JFLAGS) $<
|
|
|
|
|
|
|
|
#INCLUDES=-I/
|
|
|
|
#LIBINC=-L
|
|
|
|
#LIBS=
|
|
|
|
|
2019-09-16 15:01:44 +00:00
|
|
|
OS=$(shell uname -s)
|
2004-02-16 21:25:11 +00:00
|
|
|
CC=gcc
|
2019-09-16 15:01:44 +00:00
|
|
|
|
2019-09-17 12:44:10 +00:00
|
|
|
CFLAGS=-Wall -O2 -ggdb
|
2004-02-16 21:25:11 +00:00
|
|
|
#-O2 -ggdb
|
2019-09-17 12:39:18 +00:00
|
|
|
INCLUDES=-I /usr/include -I ../src/
|
|
|
|
LIBINC=-L /usr/lib -L ../src
|
2019-09-16 15:01:44 +00:00
|
|
|
|
2019-09-17 12:44:10 +00:00
|
|
|
BASELIBS=-lnazgul
|
|
|
|
LIBS=$(BASELIBS)
|
|
|
|
|
|
|
|
ifeq "HP-UX" "${OS}"
|
|
|
|
LIBS=$(BASELIBS) -lpthread -lrt
|
|
|
|
endif
|
|
|
|
|
2019-09-16 15:01:44 +00:00
|
|
|
ifeq "SunOS" "${OS}"
|
2019-09-17 12:44:10 +00:00
|
|
|
LIBS=$(BASELIBS) -lrt
|
2019-09-16 15:01:44 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq "Linux" "${OS}"
|
2019-09-17 12:44:10 +00:00
|
|
|
LIBS=$(BASELIBS) -lrt -lpthread
|
2019-09-16 15:01:44 +00:00
|
|
|
endif
|
2004-02-16 21:25:11 +00:00
|
|
|
|
|
|
|
PRJNAME=Libnazgul
|
|
|
|
GDATE := $(shell date +"-%Y-%m-%d_r%H")
|
|
|
|
GFILENAME := ../$(PRJNAME)$(GDATE).tar.bz2
|
|
|
|
LOCALDIR = $(shell pwd)
|
|
|
|
CFILES := $(shell ls *.c)
|
|
|
|
#OFILES := $(patsubst %.c,%.o,$(CFILES))
|
|
|
|
FILES := $(patsubst %.c,%,$(CFILES))
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
build : $(FILES)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo -e "Cleaning..."
|
|
|
|
@rm -f *.a
|
|
|
|
@rm -f *.o
|
|
|
|
@rm -f $(FILES)
|
|
|
|
|
|
|
|
% : %.c
|
2019-09-17 12:39:18 +00:00
|
|
|
$(CC) -o $* $< $(INCLUDES) $(LIBINC) $(LIBS) $(CFLAGS)
|
2004-02-16 21:25:11 +00:00
|
|
|
|