Skip to content

Commit

Permalink
add hazytrip.c and the makefile, completing the project
Browse files Browse the repository at this point in the history
  • Loading branch information
derelictpillows authored Dec 3, 2020
1 parent 212c7da commit 1dc3038
Show file tree
Hide file tree
Showing 2 changed files with 462 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# makefile for hazytrip
# see hazytrip or README.txt for author and contact info
#

CC=gcc
CFLAGS=-O3 -ansi -march=native
LDFLAGS=-lcrypto -fopenmp
INSTALLDIR=/usr/bin
OUTPUT=hazytrip
INPUT=$(wildcard *.c)

#OS X compatibility
OS_STR=$(shell uname -s)
ifeq ($(OS_STR), Darwin)
CC=clang-omp
LDFLAGS=-lcrypto -lssl -fopenmp -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include
endif

.PHONY: all install uninstall remove clean profile

all: $(INPUT)
$(CC) $(CFLAGS) -o $(OUTPUT) $(INPUT) $(LDFLAGS)

install: all
mv $(OUTPUT) $(INSTALLDIR)

uninstall:
rm -rf $(INSTALLDIR)/$(OUTPUT)

remove: uninstall

clean:
rm -rf $(OUTPUT) $(wildcard *.out)

profile: clean
$(CC) -pg $(INPUT) $(LDFLAGS)

Loading

0 comments on commit 1dc3038

Please sign in to comment.