# $Header: /cvsroot/posix2/posix2/libext/libc/unistdx/Makefile,v 1.5 2000/05/17 08:08:55 veit Exp $

# Define the relevant options that your system configuration supports:
#
# POSIX2_CHAR_TERM
# Define if if the system supports at least one terminal type capa-
#             ble of all operations described in POSIX 1003.2.
# POSIX2_C_BIND
# Define if if the system's C-language development facilities sup-
#             port the C-Language Bindings Option.
# POSIX2_C_DEV
# Define if if the system supports the C-Language Development Utili-
#             ties Option.
# POSIX2_FORT_DEV
# Define if if the system supports the FORTRAN Development Utilities
#             Option.
# POSIX2_FORT_RUN
# Define if if the system supports the FORTRAN Runtime Utilities Op-
#             tion.
# POSIX2_LOCALEDEF
# Define if if the system supports the creation of locales, other-
#             wise 0.
# POSIX2_SW_DEV
# Define if if the system supports the Software Development Utili-
#             ties Option.
# POSIX2_UPE
# Define if if the system supports the User Portability Utilities
#             Option.

DEFINES  = -D__ST_MT_ERRNO__ -DPOSIX2_C_BIND -DPOSIX2_C_DEV \
 -DPOSIX2_SW_DEV -Zmt 

INC = ../../include/

.SUFFIXES:
.SUFFIXES: .a .aux .c .cpp .cxx .C .def .dll .dvi .exe .hlp .inf .ipf \
           .lib .log .map .o .obj .rc .res .tex .toc
.PHONY: clean default distclean

CC = gcc
# flags section
DEBUG     = -g -O2 -mpentium -DDEBUG -DTHREAD_EXPERIMENTAL \
   -D_USE_HRTIMER_SYS -D_CPYFILE_FOR_SYMLINK -D_DEBUG 

WFLAGS   = -Wall -W -Wmissing-prototypes -Wshadow -Wcast-align \
   -Wpointer-arith -Winline -Wmissing-declarations  \
   -Wstrict-prototypes
# -Wconversion
INCLUDE  = -I. -I$(INC) -I$(X11ROOT)/XFree86/include
CFLAGS  = $(DEFINES) $(DEBUG) $(WFLAGS) $(INCLUDE)

SRCS    = symlink.c stubs.c sync.c usleep.c param.c sysconf.c getwd.c \
 realpath.c nice.c alarm.c

# Has to be adapted to the used suffix(es)
OBJS    = $(SRCS:.c=.o) 

all: $(OBJS) 

$(OBJS): $(INC)sys/types.h $(INC)sys/unistd.h $(INC)sys/unistdx.h $(INC)sys/errnox.h 
param.o: $(INC)sys/param.h $(INC)sys/sysctl.h $(INC)sys/kernel.h 
sysconf.o: $(INC)sys/param.h $(INC)sys/sysctl.h $(INC)sys/kernel.h
alarm.o: $(INC)sys/time.h $(INC)sys/itimer.h
clean:
	$(RM) *.o *.obj *.res *.aux *.log *.toc core *.a *.lib 