2004-02-26 11:12:43 +00:00
|
|
|
|
#-------------------------------------------------------------------%
|
|
|
|
|
#
|
|
|
|
|
# LIBNAZGUL : Library
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------%
|
|
|
|
|
#
|
|
|
|
|
# IUP GMI 2, Module de Syst<73>me. 2003-2004.
|
|
|
|
|
# Cours de J-M. Rifflet.
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------%
|
|
|
|
|
#
|
|
|
|
|
# Projet de :
|
|
|
|
|
# Glenn ROLLAND,
|
|
|
|
|
# Sebastian SCHAWOHL,
|
|
|
|
|
# Rivka ZANA
|
|
|
|
|
#
|
|
|
|
|
# pour plus de d<>tails au sujet du projet, voir le
|
|
|
|
|
# fichier README
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------%
|
2004-02-17 16:43:47 +00:00
|
|
|
|
|
2004-02-17 22:23:59 +00:00
|
|
|
|
OS=$(shell uname -s)
|
2004-02-17 16:43:47 +00:00
|
|
|
|
CC=gcc
|
2004-02-19 09:57:25 +00:00
|
|
|
|
|
2004-02-21 18:50:38 +00:00
|
|
|
|
CFLAGS=-Wall -O2 -ggdb
|
2004-02-17 21:53:14 +00:00
|
|
|
|
#-O2 -ggdb
|
2004-03-07 12:26:42 +00:00
|
|
|
|
INCLUDES=-I /usr/include/ -I ../src/
|
2004-02-21 17:38:06 +00:00
|
|
|
|
LIBINC=-L /usr/lib -L ../src
|
2004-02-17 22:23:59 +00:00
|
|
|
|
|
2004-02-21 18:50:38 +00:00
|
|
|
|
BASELIBS=-lnazgul
|
|
|
|
|
LIBS=$(BASELIBS)
|
|
|
|
|
|
2004-03-07 12:26:42 +00:00
|
|
|
|
DEFS=
|
|
|
|
|
|
2004-02-21 18:50:38 +00:00
|
|
|
|
ifeq "HP-UX" "${OS}"
|
2004-03-07 12:26:42 +00:00
|
|
|
|
DEFS=-D_NZG_HPUX
|
2004-02-21 18:50:38 +00:00
|
|
|
|
LIBS=$(BASELIBS) -lpthread -lrt
|
|
|
|
|
endif
|
|
|
|
|
|
2004-02-19 09:57:25 +00:00
|
|
|
|
ifeq "SunOS" "${OS}"
|
2004-03-07 12:26:42 +00:00
|
|
|
|
DEFS=-D_NZG_SUNOS
|
2004-02-21 18:50:38 +00:00
|
|
|
|
LIBS=$(BASELIBS) -lrt
|
2004-02-19 09:57:25 +00:00
|
|
|
|
endif
|
|
|
|
|
|
2004-02-17 22:23:59 +00:00
|
|
|
|
ifeq "Linux" "${OS}"
|
2004-03-07 12:26:42 +00:00
|
|
|
|
DEFS=-D_NZG_LINUX
|
2004-02-21 18:50:38 +00:00
|
|
|
|
LIBS=$(BASELIBS) -lrt -lpthread
|
2004-02-17 22:23:59 +00:00
|
|
|
|
endif
|
2004-02-17 21:53:14 +00:00
|
|
|
|
|
2004-02-17 16:43:47 +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
|
2004-03-07 12:26:42 +00:00
|
|
|
|
$(CC) -o $* $< $(INCLUDES) $(LIBINC) $(LIBS) $(CFLAGS) $(DEFS)
|
2004-02-17 16:43:47 +00:00
|
|
|
|
|
2004-02-19 18:26:46 +00:00
|
|
|
|
edit:
|
|
|
|
|
gvim *.h *.c
|