aboutsummaryrefslogtreecommitdiff
path: root/source/Makefile
blob: 5888d63edb42af1034a42c76ffe92e815bb5dd4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Makefile for PhotonSpinRandom C implementation

CC = cc
CFLAGS = -O2 -Wall -Wextra -std=c99
LDFLAGS = -lm

TARGET = photon_spin_random
SRC = photon_spin_random.c
HEADER = photon_spin_random.h

.PHONY: all clean test

all: $(TARGET)

$(TARGET): $(SRC) $(HEADER)
	$(CC) $(CFLAGS) -DPHOTON_SPIN_TEST_MAIN -o $(TARGET) $(SRC) $(LDFLAGS)

test: $(TARGET)
	./$(TARGET)

clean:
	rm -f $(TARGET)