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
 
DEFINES  = -D__ST_MT_ERRNO__ -Zmt 
INCLUDE  = -I. -I$(INC) -I$(X11ROOT)/XFree86/include
CFLAGS  = $(DEFINES) $(DEBUG) $(WFLAGS) $(INCLUDE)

SRCS    = symlink.c stubs.c sync.c usleep.c param.c

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

all: $(OBJS) 

$(OBJS): $(INC)sys/unistdx.h $(INC)sys/errnox.h 
param.o: $(INC)sys/param.h 

clean:
	$(RM) *.o *.obj *.res *.aux *.log *.toc core *.a *.lib 