Disregard my last post, ofcours should i have gone my own ways *giggle*, as
it looks like it works now, what wonders a shower and a cop of coffe can do
8=)

Ofcours i would like to hire others oppinion to try it out, even test it on
platforms not included, it would be nice to know it works on other platforms
to.

Use at your own risk, dont blame me if it mails me all your source codes and
then playes
around with you inodes.
-------------------- <snip - very wrongway of makeing a makefile
> ----------------
CC         = gcc
RM         = rm
EXE        = mace
SRC_FILES := $(wildcard *.c)
OBJ_FILES := $(patsubst %.c,%.o,$(SRC_FILES))
OPTIMIZE   = -O
PROFILE    = -g
C_FLAGS    = -Wall $(OPTIMIZE) $(PROFILE)
L_FLAGS    = $(OPTIMIZE) $(PROFILE)
LIBS       =

ifneq ($(PORTNAME), )

        ifeq ($(PORTNAME), linux)
            LIBS        += -lcrypt
        endif

        ifeq ($(PORTNAME), freebsd)
            C_FLAGS     += -DOLD_RAND -DNOCRYPT
        endif

        ifeq ($(PORTNAME), openbsd)
            C_FLAGS     += -DOLD_RAND -DNOCRYPT
        endif

        ifeq ($(PORTNAME), netbsd)
            C_FLAGS     += -DOLD_RAND -DNOCRYPT
        endif

        ifeq ($(PORTNAME), solaris)
            LIBS        += -lsocket -lresolv -lnsl
        endif

endif

menu:
        @echo "----------------------------------------------"
        @echo "[M]edieval [A]dventure [C]reation [E]nviroment"
        @echo "----------------------------------------------"
        @echo "linux.............................Linux v. N/A"
        @echo "netbsd...........................NetBSD v. N/A"
        @echo "openbsd.........................OpenBSD v. N/A"
        @echo "freebsd.........................FreeBSD v. N/A"
        @echo "solaris.........................Solaris v. N/A"
        @echo "----------------------------------------------"
        @echo "Usages: make system <Hit Enter>"
        @echo "----------------------------------------------"

linux:
        @make PORTNAME=linux compile

netbsd:
        @make PORTNAME=netbsd compile

openbsd:
        @make PORTNAME=openbsd compile

freebsd:
        @make PORTNAME=freebsd compile

solaris:
        @make PORTNAME=solaris compile

compile:$(OBJ_FILES)
        $(RM) -f $(EXE)
        $(CC) $(L_FLAGS) -o $(EXE) $(OBJ_FILES) $(LIBS)

.c.o: merc.h
        $(CC) -c $(C_FLAGS) $<

clean:
        $(RM) -f $(OBJ_FILES) $(EXE) *~ *.bak *.orig *.rej



Reply via email to