Skip to content

Commit

Permalink
add utils
Browse files Browse the repository at this point in the history
  • Loading branch information
segzix committed Sep 24, 2024
1 parent 002fb3e commit e06b8a0
Show file tree
Hide file tree
Showing 21 changed files with 2,185 additions and 2,041 deletions.
2 changes: 1 addition & 1 deletion apps/pi/pi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Application specific rules and defines...
#*********************************************************

CFLAGS += -I../../../src -O2 -g
CFLAGS += -I../../../src/include -O2 -g

OBJS = pi.o
VPATH = ../src
Expand Down
2 changes: 1 addition & 1 deletion apps/sor/sor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Application specific rules and defines...
#*********************************************************

CPPFLAGS += -I../../../src -O0 -g
CPPFLAGS += -I../../../src/include -O0 -g

OBJS = sor.o
VPATH = ../src
Expand Down
11 changes: 7 additions & 4 deletions lib/lib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ CCC = gcc
FC = gfortran # gfortran is more common

# define VPATH to search dependent file
VPATH = ./$(DIR)
VPATH = ./$(SRCDIR) ./$(UTILSDIR)

# define dirs
DIR = ../../src
CFLAGS += -I./${DIR} $(ARCH_FLAGS) -DDOSTAT -g
SRCDIR = ../../src
UTILSDIR = ../../src/utils
INCLUDEDIR = $(SRCDIR)/include
CFLAGS += -I./${INCLUDEDIR} $(ARCH_FLAGS) -DDOSTAT -g

# define files
SRCS := $(wildcard $(DIR)/*.c)
SRCS := $(wildcard $(SRCDIR)/*.c)
SRCS += $(wildcard $(UTILSDIR)/*.c)
OBJS := $(patsubst %.c, %.o, $(foreach file, $(SRCS), $(notdir $(file))))

TARGET = libjia.a
Expand Down
Loading

0 comments on commit e06b8a0

Please sign in to comment.