Commit e26bc5df authored by rswindell's avatar rswindell
Browse files

Added support for new targets.mk include file.

parent b01fd14f
......@@ -5,7 +5,7 @@
# For use with GNU make and GNU C Compiler #
# @format.tab-size 4, @format.use-tabs true #
# #
# usage: gmake #
# usage: gmake [os=target_os] #
#########################################################################
# $Id$
......@@ -16,10 +16,6 @@ CC = gcc
SLASH = /
OFILE = o
LD = ld
LIBFILE = .a
EXEFILE =
ifndef $(os)
os = $(shell uname)
$(warning OS not specified on command line, setting to '$(os)'.)
......@@ -31,10 +27,8 @@ DELETE = rm -fv
ifeq ($(os),FreeBSD) # FreeBSD
CFLAGS += -D_THREAD_SAFE
# Uses pthread
LFLAGS := -pthread
else # Linux / Other UNIX
# Math and pthread libraries needed
else # Linux / Other UNIX
LFLAGS := -lpthread
endif
......@@ -46,8 +40,7 @@ ODIR := $(ODIR).release
endif
include objects.mk # defines $(OBJS)
all: $(ODIR) $(ODIR)/wraptest
include targets.mk # defines all and clean targets
# Implicit C Compile Rule
$(ODIR)/%.o : %.c
......@@ -59,7 +52,7 @@ $(ODIR):
mkdir $(ODIR)
# Executable Build Rule
$(ODIR)/wraptest: $(ODIR)/wraptest.o $(OBJS)
$(WRAPTEST): $(ODIR)/wraptest.o $(OBJS)
@echo Linking $@
@$(CC) $(LFLAGS) $^ -o $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment